Closed rami1973 closed 11 years ago
I solve it like this I hope it's right way: on("cellClick",function(e, $cell,rowData) { // alert(rowData.user_allowed); if(rowData.user_allowed==0){ rowData.user_allowed='N';} else { rowData.user_allowed='Y'; }
Checkboxes are for 0 and 1 values only right now. If you want to change that, in your PHP, just grab the POST and change the 1 to Y and the 0 to N there. There isn't an option on the grid in JS to change that.
For efficiency you should be using TINYINT(1) for saving this in your database though. Not CHAR(1) for Y and N. So you should stick to 1 and 0, and change your database. You dont have to, but I would recommend it.
Thanks!
"checkbox": function(value, columnOpts, grid) { if (value=="Y"){ var checked='checked="checked"'; }else{ var checked=''; } but if i check or uncheck it uses 0 and 1 values is there any solution for that.