jQuery UI Widgets › Forums › Grid › Disabling Checkbox in Grid
Tagged: #jqwidgets-grid, grid, javascript grid, jquery grid, selectionmode
This topic contains 9 replies, has 3 voices, and was last updated by Hristo 7 years, 4 months ago.
-
Author
-
Hello
I’m using Selectionmode: ‘checkbox’ in jqxGrid. Can you provide me with an example of how I can make certain checkboxes unselectable based on a passed in variable?
Hello SC,
I would like to suggest you look at this workaround:
https://www.jseditor.io/?key=jqxgrid-disable-row-checkboxBest Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHi
I create a grid with filter ,
1. rendered all the data in grid . and i clicked a cell in the grid based on the cell value i looped though all rows and checked that cell value is equal to the all the rows value if matches i checked all the rows with the matching value.
$(“#jqxgrid”).on(‘cellclick’, function (event) {
var editrow;
var isChecked = false;
var column = event.args.column;
var rowindex = event.args.rowindex;
var columname = event.args.datafield;
editrow = rowindex;if (columname == “Sender”) {
var dataRecord = $(“#jqxgrid”).jqxGrid(‘getrowdata’, editrow);var rows = $(‘#jqxgrid’).jqxGrid(‘getrows’);
if ($(‘#jqxgrid’).jqxGrid(‘getselectedrowindexes’).length > 0) {
$(‘#jqxgrid’).jqxGrid(‘clearselection’);
isChecked = true;
}
for (var i = 0; i < rows.length; i++) {
if (rows[i].Sender === “AAA” && !isChecked) {
$(‘#jqxgrid’).jqxGrid(‘selectrow’, i);
}
}}
});
The above code is working based on my requirment toggle and detoggle.2. ISSUE IS
if we applied the filter and we click the cell
the above code is not working. not working means the row is not selecting and deselecting.if cell sorting applied for the grid then the checkbox selection and deselection is not working based on the logic
$(‘#jqxgrid’).jqxGrid(‘selectrow’, i);Hello afrath,
Could you clarify it?
What are you want to achieve?Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comi need to check the selection checkbox is active or not? using any selectors?
i have a table with rows
checkbox(selection for multiple), patient,invoice
example if we click patient name in the grid need to select all the patient name with same name , if click again same patient name it deselect ,e if toggle method.
for this i need to identify checkbox is active or not like this..
if ($(this).find(“input[type=’checkbox’]”).filter(‘[patientname=”‘ + patientname + ‘”]&&[sender=”‘ + sendername + ‘”]’).prop(“checked”))
{
(this).find(“input[type=’checkbox’]”).filter(‘[patientname=”‘ + patientname + ‘”]’).prop(‘checked’, false);
}
else
{
}
i need the above functionality in jqxgrid
}Hello afrath,
I would like to suggest you another option, it will be better to use another widget that has suitable hierarchical functionality for this purpose – jqxTreeGrid.
Please, take a look at this example:
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxtreegrid/javascript-tree-grid-hierarchical-checkboxes.htm?lightBest Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHi need jqgxrid and checkbox in front for multiple selection. so anyway to possible to find row is checked or not??
because jqxgrid gives the my remaining requirements
Hello afrath,
You could try to use getselectedrowindexes method of the Grid for this purpose.
Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.