jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Disable select all functionality for selection mode checbox
Tagged: datagrid select all checkbox
This topic contains 4 replies, has 4 voices, and was last updated by Martin 4 years, 1 month ago.
-
Author
-
HI,
I am using the grid with selection mode checkbox. i have implemented the method so that only one row will be selected using checkbox. but there is the option to select all visible in the coloumn which i dont want. please help me either to hide that option or to disable the functionalityThank you
Hi Nagoor,
I prepared for you a small example: http://jsfiddle.net/jc0x9fb2/
// number data var data = [{ "id": "1", "name": "John", "country": "USA", "location": 0, //"New York", "locations": [ 0, //"New York", 1, //"Boston", 2] //"Los Angeles"] }, { "id": "2", "name": "Robert", "country": "UK", "location": 3, //"London", "locations": [ 3, //"London", 4, //"Cardiff", 5] //"Liverpool"] }]; // prepare the data var source = { datatype: "json", localdata: data, datafields: [{ name: 'name', type: 'string' }, { name: 'country', type: 'string' }, { name: 'location', //type: 'number' }, { name: 'locations', //type: 'number' }], id: 'id', }; var dataAdapter = new $.jqx.dataAdapter(source); dataAdapter.dataBind(); $("#jqxgrid").jqxGrid({ width: 750, source: dataAdapter, columnsresize: true, ready: function() { $("#jqxgrid").find('.jqx-grid-column-header:first').children().hide(); }, selectionmode: 'checkbox', editable: true, columns: [{ text: 'Name', datafield: 'name', width: "33%" }, { text: 'Country', datafield: 'country', width: "33%" }, { text: 'Location', datafield: 'location', width: "34%", columntype: "dropdownlist" }] });
Hope this helps.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi peter,
thank you for reply. its working.
HI,
We also need the same behavior, this solution from peter is 8 year old now. is there any good way or any flag to achieve this or we can rely on this solution to make sure that in future any update will not break this solution?
Thanks,
AshvaniHello ashvani18,
You can rely on the solution suggested above.
Best Regards,
Martin YotovjQWidgets Team
https://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.