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

How can i bind Radcombobox inside radgrid with sqldatabase

1 Answer 92 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
shivesh
Top achievements
Rank 1
shivesh asked on 19 Oct 2010, 11:30 AM
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

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 19 Oct 2010, 12:09 PM
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.
Tags
ComboBox
Asked by
shivesh
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or