First of all, great framework, I love to use it and to learn more and more of it. Thank you for your work making it.
This might be very easy questions, but how can I prevent row editing based on a column (called “locked”) value?
I have around 100 columns of data that must be displayed at all times, however, only the unlocked (no checkmark) rows should be accessible for editing and saving for the user.
Just add
$grid[“loadComplete”] = “function(ids) { do_onload(ids); }”
With JS function then disable checkbox like that (#jqg_list1_2212 is some id or list1 f.e.):
function do_onload(id)
{
console.log(JSON.stringify(id));
$( “#jqg_list1_2212” ).prop(‘disabled’, ‘true’);
}
Please review column-access code. It connects on load, dblclick, select events with a callback function and disable rows based on certain row data.
Code: https://www.gridphp.com/demo/demos/editing/column-access.phps Demo: https://www.gridphp.com/demo/demos/editing/column-access.php
E.g. This code blocks editing if gender=male.