ParamQuery Grid
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Search
Login
Register
ParamQuery grid support forum
»
General Category
»
Help for ParamQuery Pro
»
CheckboxColumn
« previous
next »
Print
Pages: [
1
]
Author
Topic: CheckboxColumn (Read 3271 times)
lucafik
Pro Deluxe
Newbie
Posts: 17
CheckboxColumn
«
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.
Logged
paramvir
Administrator
Hero Member
Posts: 6255
Re: CheckboxColumn
«
Reply #1 on:
March 30, 2015, 10:21:30 pm »
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.
Logged
lucafik
Pro Deluxe
Newbie
Posts: 17
Re: CheckboxColumn
«
Reply #2 on:
March 31, 2015, 05:32:20 pm »
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?
Logged
paramvir
Administrator
Hero Member
Posts: 6255
Re: CheckboxColumn
«
Reply #3 on:
March 31, 2015, 11:25:03 pm »
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'" : "") + "/>";
}
Logged
lucafik
Pro Deluxe
Newbie
Posts: 17
Re: CheckboxColumn
«
Reply #4 on:
April 01, 2015, 02:49:44 pm »
thanks, that was the solution!
Logged
Print
Pages: [
1
]
« previous
next »
ParamQuery grid support forum
»
General Category
»
Help for ParamQuery Pro
»
CheckboxColumn