jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Indterminate Checkbox
Tagged: checkbox, column, grid, indeterminate, jqxgrid, refresh, refreshdata, updatebounddata
This topic contains 3 replies, has 2 voices, and was last updated by zack.wd 11 years, 3 months ago.
-
AuthorIndterminate Checkbox Posts
-
Hi,
I have a checkbox as a seperate column in jqxgrid (latest one) which works fine until i do the below after an ajax call :$('#jqxgrid').jqxGrid('updatebounddata'); //to refresh grid after aprroval; $('#jqxgrid').jqxGrid('refreshdata'); $('#jqxgrid').jqxGrid('refresh');
Except the first row,all the other rows are in an indeterminate state(there a black square inside checkbox).I have defined the type as bool in the source as well as in the Jqxgrid.Still cant get rid of it?
Hello zack.wd,
Please make sure the new (or updated) data source has data corresponding to the checkbox column. It is possible that the checkboxes have been set to indeterminate, because there is no data applied to the checkbox column.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Hi Dimitar,
If that is the case,then why the first row checkbox is normal and i have checked by commenting out the checkbox column in the jqxgrid.The problem persists.If i refresh the whole page,everything is normal,it is only when i refresh using the updatebounddata method,checkbox are indeterminate,Here is my code :-var source = { datatype: "json", datafields: [ // { name: 'slno'}, // { name: 'available',type: 'bool' }, { name: 'ricno'}, { name: 'reelno'}, { name: 'suppliername'}, { name: 'suppliercode'}, { name: 'gino'}, { name: 'gidate'}, { name: 'gsm'}, { name: 'width'}, { name: 'type'}, { name: 'quantity'}, { name: 'branch'} ], url : '<?php echo base_url() ; ?>index.php/inventory/ricapprovaldata' }; var dataAdapter = new $.jqx.dataAdapter(source, { downloadComplete: function (data, status, xhr) { }, loadComplete: function (data) {}, loadError: function (xhr, status, error) { } }); $("#jqxgrid").jqxGrid( { source: dataAdapter, theme: 'fresh', width:900, height:300, // altrows: true, // autoheight: false, // autowidth: true, sortable: true, editable:true, showfilterrow: true, filterable: true, //pageable: true, //groupable:true, selectionmode: 'none', columns: [ { text: '', datafield: 'available',filterable:false, columntype: 'checkbox', width: 30 }, { text: 'RIC No.', datafield: 'ricno',editable:false, width: 100}, { text: 'Reel No.', datafield: 'reelno',editable:false, width: 100,filterable:false}, { text: 'Supplier Name', datafield: 'suppliername',editable:false,width:138,filterable:false}, { text: 'Supplier Code',filterable:false,editable:false, datafield: 'suppliercode', width:20}, { text: 'GI No.',filterable:false,editable:false,datafield:'gino',width:100}, { text: 'GI Date.',filterable:false,editable:false,datafield:'gidate',width:90}, { text: 'GSM', editable: false,filterable:false,editable:false,datafield: 'gsm', width: 55,cellsalign: 'right'}, { text: 'Width',filterable:false,datafield: 'width', editable:false,width: 55,cellsalign: 'right'}, { text: 'Type',filterable:false,datafield: 'type', editable:false,width: 45,cellsalign: 'right'}, { text: 'Quantity',filterable:false,editable:false, datafield: 'quantity', width: 78,cellsalign: 'right'}, { text: 'Branch',filterable:false,editable:false, datafield: 'branch', width:90,cellsalign: 'right'}, ] });
Hi Dimitar,
Got it working….just added an available field in the JSON result array with value as “false”…and also added back the checkbox column in Source with type bool as well as in the Jqxgrid options.Thnx -
AuthorPosts
You must be logged in to reply to this topic.