Hi,
I have a combobox within a griditemtemplate. This combobox is being populated in sql by using the following code.
The problem I have now is that I want to bind a value from the grid as the text for this combobox only after the combobox has been populated. As of right now, the combobox comes up empty because I try to bind the text value before there are any values in the combobox.
Please let me know how I can achieve this!
Thanks!
Trevor
I have a combobox within a griditemtemplate. This combobox is being populated in sql by using the following code.
Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As GridItemEventArgs)
If e.Item.ItemType = 2 And e.Item.IsInEditMode Then
Dim editform As GridDataItem = CType(e.Item, GridDataItem)
Dim comboBox As RadComboBox = editform.FindControl("cmboDomains")
PopulateComboEmail(comboBox)
End If
End Sub
The problem I have now is that I want to bind a value from the grid as the text for this combobox only after the combobox has been populated. As of right now, the combobox comes up empty because I try to bind the text value before there are any values in the combobox.
<
telerik:RadTextBox
id
=
"txtEmailAddress"
runat
=
"server"
MaxLength
=
"150"
Width
=
"200"
Text='<%# Bind("proxyAddresses") %>'/>@<
telerik:RadComboBox
ID
=
"cmboDomains"
runat
=
"server"
Width
=
"200"
text
=
"'<%# Bind("
domain") %>'"></
telerik:RadComboBox
>
Please let me know how I can achieve this!
Thanks!
Trevor