This is a migrated thread and some comments may be shown as answers.

[Solved] Grab the boolean value of checkbox in Datagrid

2 Answers 87 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Hatsuki
Top achievements
Rank 1
Hatsuki asked on 05 Apr 2012, 12:13 PM
Hi,
I would like to retrieve the checkbox value through the OnRowSelect client event. Through the innerHTML, the only I can get is whole html of checkbox.
I just wonder are there any approaches are able to grab the Checked property of chechbox control
Thank you very much for your help. really appreciate it.
 

2 Answers, 1 is accepted

Sort by
0
Accepted
Dadv
Top achievements
Rank 1
answered on 05 Apr 2012, 01:51 PM
try this: 

function onRowSelect(e) {
       
var row = e.row;
var value = $(row).find('input[type="checkbox"]').val(); //value of the checkbox

   
}
0
Hatsuki
Top achievements
Rank 1
answered on 08 Apr 2012, 06:11 AM
Thanks for your response, Dadv.
I solve this with the $().attr("checked",true).
Tags
Grid
Asked by
Hatsuki
Top achievements
Rank 1
Answers by
Dadv
Top achievements
Rank 1
Hatsuki
Top achievements
Rank 1
Share this question
or