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

[Solved] How to allow only one checkbox checked in Radgrid template column

1 Answer 343 Views
Grid
This is a migrated thread and some comments may be shown as answers.
CHE PAK
Top achievements
Rank 1
CHE PAK asked on 01 Aug 2013, 07:32 AM
Hi team,
Language : vb.net
I tried search in your forum and all the examples given. Most of them, only show in c# not in vb.net.
And the function for onclick is not available ..except oncheckedchanged.
My problem is.
I have a checkbox column in Radgrid and only one must be selected. If more than that it will show an error in textbox.

One more case :
If i use GridClientSelectColumn, how to add a function like on checkedchanged.

Can somebody guide me.
Thanks.

1 Answer, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 06 Aug 2013, 06:21 AM
Hello,

The functionality mentioned is achievable by using the GridClientSelectColum which will allow the user to select only one row at a time. In this scenario you can subscribe to the RowSelected client event and execute some logic if needed. In order to demonstrate this I have prepared a sample project which can be found in attachments.

If however the requirement is to select the items on the server I would recommend using a template column with an ASP CheckBox control inside the item template. This would allow you to subscribe to the server OnCheckedChanged event and perform server-side selection.

Regards,
Angel Petrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
CHE PAK
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Share this question
or