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

Populate a combo based on another combo within same GridView

1 Answer 275 Views
GridView
This is a migrated thread and some comments may be shown as answers.
jerry
Top achievements
Rank 1
jerry asked on 29 Jan 2010, 06:59 PM
I want to start off by apologizing for my many posts recently.  A project that was dead for about a year has become a top priority so I have to learn a lot and real fast.  Thank you for everyones help.

My current situation is kind of tricky.  I have a grid view that has many users with State and City columns.  I'm dynamically creating these columns on load of the form.  I'm pointing to all the right field names.  My problem is that I need to be able to populate my city combobox based on my state combobox.  So the user has Florida as State and Orlando as city when the user goes to change the city the drop down should have the rest of the florida cities.  If he changes the state the city combo should populate with all those cities.  I need just the combobox within the current rows datasource to change not every combobox in that column.  Is this possible?
I have a table with StateId, StateName and another table with CityId, CityName.

Anything to lead me in the right direction would be greatly appreciated.

Thanks in advance for any help

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 03 Feb 2010, 02:43 PM
Hello jerry,

Thank you for the question.

I am attaching a sample project which demonstrates how you can make a RadComboBoxEditor in GridViewComboBoxColumn dependant on the value of another cell. Just select Fruit or Vegetable from the first combo and you will notice that the 'Food' RadComboBoxEditor displays a list of the respective products.

I hope this helps. If you have additional questions, feel free to contact me.

Kind regards,
Nikolay
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
GridView
Asked by
jerry
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or