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

Dynamically Change Datasource of GridDropDownColumn

1 Answer 110 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
john
Top achievements
Rank 1
john asked on 21 May 2008, 04:33 PM
Hi,

I have a GridDropDownColumn, and two data sources (objectDatasource1, objectDatasource2).

The GridDropDownColumn uses objectDatasource1.
 
However, for inserts, I want the GridDropDownColumn (in the insert row) to use objectDatasource2.  How do I accomplish this?

Thanks!
John

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 26 May 2008, 02:20 PM
Hello john,

The built-in GridDropDownColumn is designed to be used mainly with DataTables in order to easily map and generate their dropdown items values in conjunction with the DataField/ListValueField/DataSourceID/ListDataMember values of the column.

For custom objects collections or when you want to change the source of the dropdown editor dynamically, consider replacing the GridDropDownColumn with template column holding MS DropDownList in its edit template. This will allow to generating/binding the items for the MS DropDownList inside the ItemDataBound handler of RadGrid or change the DataTextField/DataValueField/DataSourceID of the dropdown editor.

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Chart (Obsolete)
Asked by
john
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or