How can i bind Radcombobox inside radgrid with sqldatabase

2 posts, 0 answers
  1. shivesh
    shivesh avatar
    38 posts
    Member since:
    Sep 2010

    Posted 19 Oct 2010 Link to this post

    Hi,
    Anybody tell me How can i bind Rad combobox inside rad grid with sql database and when i will select an item from Rad combo box label display respected value

    thanks Shivesh
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 19 Oct 2010 Link to this post

    Hello Shivesh,


    You could set the DataSourceID of the RadComboBox to the concerned SqlDataSource. Now attach the OnSelectedIndexChanged event and in the event handler, access the Label and set the Text property.

    Now, if the Label is outside the grid, then you can directly access it and set the Text. But in the case of Label placed in the grid row (ItemTemplate), then you need to get reference to GridDataItem using NamingContainer of combo in the SelectedIndexChanged event and then use the FindControl() to access it.
    Referencing controls in grid row/edit form


    I hope these suggestions help you.


    -Shinu.
Back to Top