I am using two GridDropDownColumn inside RadGrid.
1- DropDownList is AssetType
2- DropDownList is Category
What I am trying to do is this:
When user select value from first dropdown list (AssetType), I need to get the asset type value so I can update the values in second dropdown list (category).
So bit of research I found some help, which is to attach an event to a GridDropDownColumn. I have found this code on many forums to attach an event
SomeList.ComboBoxControl.SelectedIndexChanged = New RadComboBoxSelectedIndexChangedEventHandler(AddressOf ComboBoxControl_SelectedIndexChanged)
Protected Sub ComboBoxControl_SelectedIndexChanged(ByVal sender as Object, ByVal e as RadComboBoxSelectedIndexChangedEventArgs)
' code goes here
End Sub
But when I try to attach an event in my code my list doesn't give me 'SelectedIndexChanged' option instead it gives me 'SelectedIndex' option.
To cut long story short can you please tell me with example how to attach an event to a GridDropDownColumn and also check below code and tell me what I am doing wrong.
Private Sub AssetGrid_ItemCreated(ByVal sender as Object, ByVal e as Telerik.Web.UI.GridItemEventArgs) Handles AssGrid.ItemCreated
If TypeOf e.Item Is GridEditableItem AndAlso (e.Item.IsInEditMode) Then
Dim editableItem as GridEditableItem = DirectCast(e.Item, GridEditableItem)
‘ Get the asset list
Dim assetList As GridDropDownListColumnEditor = TryCast(editableItem.EditManager.GetColumnEditor(“AssetTypeID”) , GridDropDownListColumnEditor)
AssetList.ComboBoxControl.AutoPostBack = True
AssetList.ComboBoxControl.SelectedIndex = New RadComboBoxSelectedIndexChangedEventHandler(AddressOf ComboBoxControl_SelectedIndexChanged)
End If
Protected Sub ComboBoxControl_SelectedIndexChanged(ByVal sender as Object, ByVal e as RadComboBoxSelectedIndexChangedEventArgs)
' code goes here
End Sub
Its urgent!
Many Thanks