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

Showing subset of items, based on row

1 Answer 66 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mikael
Top achievements
Rank 1
Mikael asked on 25 Sep 2008, 08:50 AM
Let's say I have multiple rows in a RadGrid. One of the column is a GridDropDownColumn. The RadGrid is in "all-rows-edit-mode".

Is there any way that I can filter each instance of the GridDropDownColumn, based on, for instance, the key-value of the respective row, without using load-on-demand?

For instance, consider a grid with two columns "Type" and "Instance".
The Type column is a readonly bound column, wheras Instance is a dropdown column.
There are three rows in the grid, where Type has the values "Animal", "Fruit" and "Vehicle". Now, I want the content of the three different dropdowns to be filtered based on the Type-value for the respective row.
In other words:
For row "Animal", the dropdown shows "Cat", "Dog", etc
For row "Fruit",  the dropdown shows "Apple", "Pear", etc
For row "Vehicle",  the dropdown shows "Car", "Bus", etc

Can this be done without using load-on-demand (which would complicate things a lot in our case)?

Thanks!
/Fredrik



1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 26 Sep 2008, 02:04 PM
Hello Fredrik,

You can pass a separate datasource to the dropdown, which is related to the item currently being databound for the grid.

Sincerely yours,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Mikael
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or