jqGrid与multiselect如何检查所有复选框和负载最大的复选框? [英] jqGrid with multiselect how to check all checkboxes and top one at load?

查看:122
本文介绍了jqGrid与multiselect如何检查所有复选框和负载最大的复选框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何在实例化jqGrid时直接选择所有复选框?可以以某种方式将其作为colModel中的参数吗?

How can I instruct jqGrid to directly select all checkboxes when I instantiate it? Can this be done as a parameter in the colModel somehow?

推荐答案

我尝试了

$('.cbox').click();

中的

,但没有用.然后我尝试了这个:

in the gridComplete but that didn't work. Then I tried this:

$('.cbox').attr('checked', true);

并且有效,它将所有复选框都设置为选中,但是发生的事情是我需要单击两次以取消选中一个.

and that worked, it set all checkboxes to checked but what happened then is that I needed to click twice to uncheck one.

对我有用的是:

$('.cbox').trigger('click');

这篇关于jqGrid与multiselect如何检查所有复选框和负载最大的复选框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆