jQWidgets Forums
jQuery UI Widgets › Forums › Grid › grid with checkbox
This topic contains 5 replies, has 2 voices, and was last updated by rani 11 years, 4 months ago.
-
Authorgrid with checkbox Posts
-
Hello peter,
There is a checkbox column inside grid,i have set to datafield to checkbox.when i refresh the grid the check columns are
go to the indeterminate state when threestatecheckbox was defined as false.please give me solution.
regards,
raniHi rani,
The column should be bound to a Boolean data field in order to work. This mean that the datafield property of the column should be set to a String which matches to a datafield item from the source object that has type: “bool” setting. You can also view the implementation of the checkbox column’s demo.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi peter,
I have set the type to bool only i am getting that issue.
Regards,
raniHello peter,
I have set the type to bool but
check boxes are
go to the indeterminate state .
when i refreshed the grid also
they are going to that state.Please give me the solution.
Regards,
raniHi rani,
This example shows how is expected a Checkbox column to be defined: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/checkboxcolumn.htm?arctic
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hello,
i have taken checkbox in the first column.when i resizing the page all
when i refresh the grid the check columns are
go to the indeterminate state when threestatecheckbox was defined as false.
below is my code.
var source =
{
datatype: “local”,
datafields:
[
{ name: ‘FileName’ },
{ name: ‘Size’ },
{ name: ‘Extension’ },
{ name: ‘AssetType’ },
{ name: ‘Customer’ },
{ name: ‘Title’ },
{ name: ‘EpisodeTitle’ },
{ name: ‘EpisodeNumber’ },
{ name: ‘Language’ },
{ name: ‘IsChecked’, type: ‘bool’ }
],
updaterow: function (rowid, rowdata, commit) {
commit(true);
},
deleterow: function (rowid, commit) {
commit(true);
}
};$(“#IngestGrid”).jqxGrid(
{
width: ‘100%’,
source: source,
height: 550,
theme: ‘arctic’,
sortable: true,
altrows: true,
enabletooltips: true,
columnsresize: true,
columnsreorder: true,
localization: getLocalization(),
selectionmode: ‘multiplecellsadvanced’,
editable: true,
columns: [{
text: ”, datafield: ‘IsChecked’, columntype: ‘checkbox’, checked: false, threestatecheckbox: false, editable: true, pinned: true, width: ‘2%’, sortable: false, cellsrenderer: cellsrenderer, rendered: function () {
$(‘#IngestGrid’).on(‘rowunselect’, gridrowunselect);
}
},
{ text: ‘Filename’, datafield: ‘FileName’, width: ‘14%’, editable: false, pinned: true },
{ text: ‘Size’, datafield: ‘Size’, width: ‘8%’, editable: false, pinned: true, sortable: false },
{ text: ‘Ext’, datafield: ‘Extension’, width: ‘8%’, editable: false, pinned: true, sortable: false },
{ text: ‘Type’, datafield: ‘AssetType’, width: ‘12%’, editable: false, sortable: false }]
});
what’ wrong in my code.regards,
rani -
AuthorPosts
You must be logged in to reply to this topic.