ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: lucafik on March 30, 2015, 09:26:24 pm
-
How can I represent the boolean value from the HTML table in a pqgrid.
I have used
type: 'checkBoxSelection', cb: {all: true, header: false}
and created a pqgrid from an html table
var $grid = $("#tbl_for_grid").pqGrid(newObj);
but all of my rows are marked as checked and selected, like this.
http://pokit.org/get/img/f25ebcc2d0b05c277bdb7efa6369e9cd.jpg
I dont want my rows to be selected, and I need the value to correspond the values in the table.
-
you don't need checkBoxSelection column. How are the boolean values stored in the table. If they are just true & false, you could probably display them as true / false in pqGrid too.
-
I can display them as textual true/false, but I need a checkbox that will be checked depending on the value in the html table. Sorry, now I see that my question wasnt quite clear.
Is that possible?
-
If you want to display checkboxes, then implement a render callback for that column.
render: function(ui){
return "<input type='checkbox' "+ (ui.cellData? "checked='checked'" : "") + "/>";
}
-
thanks, that was the solution!