Hi,
I have 2 radcombox, RadComboBox A and RadComboBox B which the data in RadComboBox B is decided by the selection in RadCombobox A. Both the RadCombobox is in RadGrid.
When the grid go into "Add Record "mode , i fail to populate the data in RadComboBox B for the first item in RadComboBox A.My coding is as below :
My coding work fine only when the RadGrid go into "Add Record " mode, no selection has been done on RadComboBox A, it fail to populate the data to RaCombobox B based on the first item in RaCombobox A.
Does anyone has idea on populate the data in RadComboBox B based on the first item in RadComboBox A when RadGrid go into "Add Record" mode?
I have 2 radcombox, RadComboBox A and RadComboBox B which the data in RadComboBox B is decided by the selection in RadCombobox A. Both the RadCombobox is in RadGrid.
When the grid go into "Add Record "mode , i fail to populate the data in RadComboBox B for the first item in RadComboBox A.My coding is as below :
<ajax:RadComboBox runat="server" ID="RadComboA" DataSource="<%# getApp() %>" OnSelectedIndexChanged="BindSecondCombo" |
DataTextField="Selection" AutoPostBack ="true" |
DataValueField="AppId" |
SelectedValue='<%# DataBinder.Eval(Container.DataItem, "AppId") %>'></ajax:RadComboBox> |
Public Sub BindSecondCombo(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) |
Dim radComboA As RadComboBox |
Dim radComboB As RadComboBox |
Dim editItem As GridDataInsertItem |
radComboA = CType(sender, RadComboBox) |
editItem = CType(radCombo1.NamingContainer, GridDataInsertItem) |
radComboB = CType(editItem.FindControl("radComboB"), RadComboBox) |
If radComboB Is Nothing = False Then |
radComboB.ClearSelection() |
radComboB.DataSource = getRecordByType(7, radComboA.SelectedValue, "", "", "", "", "") |
radComboB.DataTextField = "modulename" |
radComboB.DataValueField = "moduleid" |
radComboB.DataBind() |
End If |
End Sub |
My coding work fine only when the RadGrid go into "Add Record " mode, no selection has been done on RadComboBox A, it fail to populate the data to RaCombobox B based on the first item in RaCombobox A.
Does anyone has idea on populate the data in RadComboBox B based on the first item in RadComboBox A when RadGrid go into "Add Record" mode?