Hi I am trying the set the SelectedValue in the item databound event as follows
and this works as it is, but I actually want to have the SelectedValue set to a specific column value of the selected row, but I am not sure how I can get this value at this point
Basically I am trying to replicate what happens declaratively when you have SelectedValue='<%# Bind("ColumnName") %>' but be able to intercept the value in case it does not exist in the list of values in the combobox and causes the 'Out of range' error.
Please advise !
Protected Sub RadGrid1_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound If TypeOf e.Item Is GridEditFormItem AndAlso e.Item.IsInEditMode Then Dim editform As GridEditFormItem = DirectCast(e.Item, GridEditFormItem) Dim combo As RadComboBox = DirectCast(editform.FindControl("RadComboBox1"), RadComboBox) combo.SelectedValue = "123 End IfEnd Suband this works as it is, but I actually want to have the SelectedValue set to a specific column value of the selected row, but I am not sure how I can get this value at this point
Basically I am trying to replicate what happens declaratively when you have SelectedValue='<%# Bind("ColumnName") %>' but be able to intercept the value in case it does not exist in the list of values in the combobox and causes the 'Out of range' error.
Please advise !