Dynamically Change Datasource of GridDropDownColumn

Thread is closed for posting
2 posts, 0 answers
  1. john
    john avatar
    18 posts
    Member since:
    Apr 2008

    Posted 21 May 2008 Link to this post


    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?

  2. Sebastian
    Sebastian avatar
    9934 posts

    Posted 26 May 2008 Link to this post

    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,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top