禁用JQGrid中的所有复选框 [英] Make disabled all check boxes in JQGrid
问题描述
大家好,
我正在JQGrid上工作...在那儿我正在使用multiselect:true ...
Nad将第一列作为Chekbox ....如果我在复选框上选中并将其设置为获胜者,那么在看到该记录时应禁用所有复选框,而上一次选中该复选框时应选中该复选框,则为下一次时间... .......
我发现了如何隐藏该行,但是我找不到如何禁用JQGrid中的所有复选框....
我的JQGrid的代码是..............
Hi all,
I am working on JQGrid...in there i am using multiselect:true...
Nad getting first column as Chekbox....if i select on checkbox and set it as a winner then nex time when see that record all the checkboxes should be disabled and those whose were selected last time that check boxes should be checked..........
i found how to hide that row but i am not able to find how to disabled all the check boxes in JQGrid....
the code for my JQGrid is ..............
$("#Participant").jqGrid({
url: 'Handlers/AllContestParticipantHandler.ashx',
editurl: 'Handlers/AllContestParticipantHandler.ashx',
datatype: "xml",
mytype: "GET",
width: 736,
height: "100%",
colNames: ['Contest Title','Member Name','Email Id','Flag','Winner','Contribute'],
colModel: [
{ name: 'ContestTitle', index: 'ContestTitle', editable: true,edittyp: 'text', editrules: { required: true} },
{ name: 'MemberName', index: 'MemberName', editable: true, sorttype: 'text'},
{ name: 'EmailId', index: 'EmailId', editable: true, sorttype: 'text'},
{ name: 'Flag', index: 'Flag', editable: true, sorttype: 'text'},
{ name: 'Winner', index: 'Winner', editable: false, edittype: "checkbox", editoptions: { value: '1:0' }, formatter: "checkbox", formatoptions: { disabled: true }, sortable: false},
{ name: 'Contribute', index: 'Contribute', editable: false, edittype: "checkbox", editoptions: { value: '1:0' }, formatter: "checkbox", formatoptions: { disabled: true }, sortable: false},
],
onCellSelect: function(rowId, iCol, cellContent, target) {
parentRowId = rowId;
},
pager: "#pager",
caption: "All Contest Participants",
sortName: 'ContributedRecipeId',
rowNum: 10,
sortorder:'desc',
multiselect: true,
rowList: [10, 20, 30],
viewrecords: true
}).navGrid("#pager", { edit: false, add: false, del: true, search: true },
{reloadAfterSubmit: true, jqModel: true, closeOnEscape: true, closeAfterAdd: true},//del
{closeAfterSearch: true, drag: true, closeOnEscape: true, afterShowSearch: function() {
$.post("Handlers/AllContestParticipantHandler.ashx?valSearch=true", {}, function(data) { });
}}
)
请告诉我是否可以禁用所有复选框...
提前感谢...
Please go through this tell me if i can make disabled all the check boxes...
Thanx in advance...
推荐答案
(" ).jqGrid({ 网址:' Handlers/AllContestParticipantHandler.ashx', editurl:' Handlers/AllContestParticipantHandler.ashx', 数据类型:" , mytype:" , 宽度: 736 , 高度:" , colNames:[' 比赛标题',' 成员名称',' 电子邮件ID',' 标记',' 优胜者,' 贡献'], colModel:[ {名称:' ContestTitle',索引:' ContestTitle',可 true ,edittyp:' 文本',编辑规则:{必需: true }}, {名称:' MemberName',索引:' MemberName',可 true ,排序类型:' 文本'}, {名称:' EmailId',索引:' EmailId',可 true ,排序类型:' 文本'}, {名称:' 标记',索引:' 标记',可 true ,排序类型:' 文本'}, {名称:' 优胜者,索引:' 优胜者,可 false ,可编辑类型:" 复选框",编辑选项:{ ' 1:0'},格式化程序:" ,格式选项:{已禁用: false }, {名称:' 贡献',索引:' 贡献',可 false ,可编辑类型:" 复选框",编辑选项:{ ' 1:0'},格式化程序:" ,格式选项:{已禁用: false }, ], onCellSelect:function(rowId,iCol,cellContent,target){ parentRowId = rowId; }, 传呼机:" , 标题:" , sortName:' ContributedRecipeId', rowNum: 10 , sortorder:' desc', 多项选择: true , rowList:[ 10 , 20 , 30 ], viewrecords: true }).navGrid(" ,{ false ,添加: false ,del: true ,搜索: true }, {reloadAfterSubmit: true ,jqModel: true ,closeOnEscape: true ,closeAfterAdd: true },// del {closeAfterSearch: true ,拖动: true ,closeOnEscape: true ,afterShowSearch:function(){
("#Participant").jqGrid({ url: 'Handlers/AllContestParticipantHandler.ashx', editurl: 'Handlers/AllContestParticipantHandler.ashx', datatype: "xml", mytype: "GET", width: 736, height: "100%", colNames: ['Contest Title','Member Name','Email Id','Flag','Winner','Contribute'], colModel: [ { name: 'ContestTitle', index: 'ContestTitle', editable: true,edittyp: 'text', editrules: { required: true} }, { name: 'MemberName', index: 'MemberName', editable: true, sorttype: 'text'}, { name: 'EmailId', index: 'EmailId', editable: true, sorttype: 'text'}, { name: 'Flag', index: 'Flag', editable: true, sorttype: 'text'}, { name: 'Winner', index: 'Winner', editable: false, edittype: "checkbox", editoptions: { value: '1:0' }, formatter: "checkbox", formatoptions: { disabled: true }, sortable: false}, { name: 'Contribute', index: 'Contribute', editable: false, edittype: "checkbox", editoptions: { value: '1:0' }, formatter: "checkbox", formatoptions: { disabled: true }, sortable: false}, ], onCellSelect: function(rowId, iCol, cellContent, target) { parentRowId = rowId; }, pager: "#pager", caption: "All Contest Participants", sortName: 'ContributedRecipeId', rowNum: 10, sortorder:'desc', multiselect: true, rowList: [10, 20, 30], viewrecords: true }).navGrid("#pager", { edit: false, add: false, del: true, search: true }, {reloadAfterSubmit: true, jqModel: true, closeOnEscape: true, closeAfterAdd: true},//del {closeAfterSearch: true, drag: true, closeOnEscape: true, afterShowSearch: function() {
.post(" ,{},function(data){}); }} )
.post("Handlers/AllContestParticipantHandler.ashx?valSearch=true", {}, function(data) { }); }} )
请告诉我是否可以禁用所有复选框...
预先感谢...
Please go through this tell me if i can make disabled all the check boxes...
Thanx in advance...
请尝试以下操作:
如何启用/根据某些条件禁用jqgrid中的复选框 [ GOOGLE [
Hi,
Please try following:
How to enable/disable checkbox in jqgrid based on some condition[^]
or go
G O O G L E[^]
Thanks,
Imdadhusen
这篇关于禁用JQGrid中的所有复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!