Hey, I need to use checkbox in datagrid but I need it to have a title like every other column and also width.
So I created a formatter for the row but I have a few problems:
1) Im trying to give it a default state for each row by the value of the field, If its true then its checked and false is unchecked.
The values in the field are true or false so I tried:
formatter: function(value,row,index){
return '<input type="checkbox" value="'+value+'">';
}
and also:
formatter: function(value,row,index){
return '<input type="checkbox" checked="'+value+'">';
}
both doesnt work well.
2) When pressed on the checkbox the row will get selected/unselected and since its created via formatter the 'selectOnCheck = false' propertie doesnt work, how can I make the row not to be
selected when the checkbox is pressed?
3) How can I easly get the checkbox value for each row?
Thanks, Alon.