Hi Abu,
Im not sure if thats the correct way to word my question.
Basically… i want to add checkboxes to the last few columns of my grid. when the checkboxes are clicked, it updates the data in my database and refreshes the grid.
Example: (inventory system)
I have checkboxes for "Recieved", "processed" and "complete". If i click the "complete" checkbox, the "LOC" value in my database changes to 'COMP' for that specific entry.
I hope you understand, im not too good at getting what i mean in my head to paper!
Thanks in advance
I would also like to add i know how to change the render type to a checkbox for the column, but they are not clickable unless editing a specific entry. I would like the checkboxes to be clickable at any time whilst on the grid.
Regards
Similar question answered here:
http://stackoverflow.com/a/2782019/385377
Equivalent code of grid would be:
$col["formatter"] = "checkbox";
$col["formatoptions"]["disabled"] = false;
and then link JS code ..
// Assuming check box is your only input field:
jQuery(".jqgrow td input").each(function(){
jQuery(this).click(function(){
// POST your data here…
});
});