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

Finding controls in the same row

2 Answers 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 17 Aug 2008, 03:01 AM
In my grid I have two template columns and each one contains an asp:checkbox in its template.  Within each row, I would like to have only one checkbox checked at a time and I would like to handle it client side.

I have been through the code library and there are several good examples of keeping only one checkbox in a template in a column checked at a time - but not within a row.

Does anyone have a snippet to get me started?

I guess onclick just looping through all the controls in the row, trapping just checkboxes and, when one is found, as long as it is not the one being clicked, uncheck it.

I would appreciate any head starts on this - thanks!


 

2 Answers, 1 is accepted

Sort by
0
Accepted
Konstantin Petkov
Telerik team
answered on 18 Aug 2008, 07:11 AM
Hi Mark,

You can start reviewing the implementation of the below live demo, which illustrates how to find the control you need wrapped in a Grid TemplateColumn:

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Programming/AccessingCellsAndRows/DefaultCS.aspx


All the best,
Konstantin Petkov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Mark
Top achievements
Rank 1
answered on 18 Aug 2008, 02:21 PM
Thanks, Konstantin.

Between the link you provided and the single check per column project in the code library, I was able to fashion a solution.

Mark
Tags
Grid
Asked by
Mark
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
Mark
Top achievements
Rank 1
Share this question
or