Hi,
I have two related comboboxes here in Edit Form Template . and OnSelectedIndexChanged Loads the Items in the second ComboBox.
This Code works Fine on Insert Mode but on Edit Mode it Can't see the ComboBoxes ( return Nothing ):
--- > CustomerCombo and ContactsCombo Access the edit form and gets the RadComboBoxes and Works Fine in InsertMode
But in Edit Mode , Iam not able to Access The editform and get controls by this way or any other way !
Can anyone helps me in this Please ( Urgent ).
I have two related comboboxes here in Edit Form Template . and OnSelectedIndexChanged Loads the Items in the second ComboBox.
This Code works Fine on Insert Mode but on Edit Mode it Can't see the ComboBoxes ( return Nothing ):
Protected
Sub
CustomerName_SelectedIndexChanged(
ByVal
o
As
Object
,
ByVal
e
As
RadComboBoxSelectedIndexChangedEventArgs)
Dim
editedItem
As
GridEditFormItem =
DirectCast
(rgOpportunities.MasterTableView.GetItems(GridItemType.EditFormItem)(0), GridEditFormItem)
Dim
CustomerCombo
As
RadComboBox =
DirectCast
(editedItem.FindControl(
"rcbCustomerName"
), RadComboBox)
Dim
ContactsCombo
As
RadComboBox =
DirectCast
(editedItem.FindControl(
"rcbContactName"
), RadComboBox)
If
(CustomerCombo.DataSourceID IsNot
Nothing
)
Then
CustomerCombo.DataSourceID =
String
.Empty
End
If
ContactsCombo.DataSource = LoadContacts(e.Value)
'ContactsCombo.Items.Clear()
ContactsCombo.OpenDropDownOnLoad() =
True
ContactsCombo.DataBind()
If
ContactsCombo.Items.Count > 0
Then
Session(
"ContactID"
) = ContactsCombo.Items(0).Value
Else
Session(
"ContactID"
) =
""
End
If
End
Sub
--- > CustomerCombo and ContactsCombo Access the edit form and gets the RadComboBoxes and Works Fine in InsertMode
But in Edit Mode , Iam not able to Access The editform and get controls by this way or any other way !
Can anyone helps me in this Please ( Urgent ).