What I would like to end up with is a simple grid that cannot be edited but with a simple checkbox in the first row. This checkbox will be able to be checked and unchecked with the mouse. All checkboxes will be check when loaded. When the process is complete and the end user has uncheck the boxes that he or she wants then I want to loop through the grid and read the values of the second column based upon the value of the check mark. The data that I'm using is being pulled from a web service writing JSON from a MS SQL database. What the best way to do this?
Hello Al,
Clicking on the header checkbox will check/uncheck all checkboxes, so my suggestion is to implement this functionality somewhere else.
In order to count the checkboxes you can iterate through all rows and use 'is' in order to check if the checkbox for the particular row is checked:
http://stackoverflow.com/questions/901712/check-checkbox-checked-property
hey Zdravko, i have a simliar question. i have a grid with a checkbox column (checkbox header to select all). when i click the checkboxes or the header checkbox i want to display count of total items checked in a seperate label.
i have it working for checking each individual checkbox but not the check all.
p.s. not using template column
how would i go about that?
thanks
This is perfect.
Thank you--
Hello William,
Thank you for contacting us.
I hope that I understand correctly your requirements, if not please let me know what I am missing from your scenario. Below you can find a sample where I have a grid with template column which have checkboxes, and when I press a button I am getting the value from ProductNumber field and I am showing it in alert box. You should use a similar approach.
Looking forward to hearing from you.