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

Related Combobox functionality in radgrid with GridDropDownColumn

3 Answers 58 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rootvik Pancholi
Top achievements
Rank 1
Rootvik Pancholi asked on 25 Jun 2010, 12:16 PM
Hi,

As we have related combobox functionality with RadCombobox. I want to use such functionality with RadGridDropDownColumn in RadGrid.

Is it possible to do?if you can provide any sample code for that.it will be very helpfull.

Thanks.
Rootvik Pancholi.

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 25 Jun 2010, 12:59 PM
Hello,

One suggestion would be performing these functionalities on server side.

You can get reference to the GridDropdownColumn in the ItemCreated event and attach the SelectedIndexChanged event for the control. Now in the event handler, access the second dropdownlist control and populate it accordingly.

You can access the second dropdownlist control by accessingt the editform (using NamingContainer property of dropdown) and then by using the FindControl() method.


Thanks,
Princy.
0
John Cooney
Top achievements
Rank 1
answered on 25 Aug 2012, 04:43 PM
Princy,

Are you saying that there is no means of accomplishing this task with a parameter on the sqldatasource of the related griddropdownbox??

I guess there is no way to utilize a controlparameter or sessionparameter tied back to the selected id of the controlling griddropdownbox?

Thanks,
JC
0
Tsvetina
Telerik team
answered on 30 Aug 2012, 07:49 AM
Hi John,

This functionality cannot be achieved declaratively. Even if you manage to use a control or session parameter with the SqlDataSource for the RadComboBoxes, the combos are bound at the same time, meaning that this parameter would still be empty for the second combo when it is databound. So, you would need to perform logic on SelectedIndexChanged of the first combo to populate the second one with a filtered datasource.

Kind regards,
Tsvetina
the Telerik team
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 their blog feed now.
Tags
Grid
Asked by
Rootvik Pancholi
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
John Cooney
Top achievements
Rank 1
Tsvetina
Telerik team
Share this question
or