Hi,
I've a ComboBox in ListView EditItemTemplate and I'm filling it programatically;
The problem is that when I press edit button EditItemTemplate thow exception;
Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.
What can I do for this situation ?
PS: I'm sure that Bind("KAYITNO") value is exists in comboBox items.
I've a ComboBox in ListView EditItemTemplate and I'm filling it programatically;
aspx file
...
<EditItemTemplate> <telerik:RadComboBox ID="cmb" runat="server" SelectedValue='<%#Bind("KAYITNO")%>'> </telerik:RadComboBox></EditItemTemplate>...cs file...protected void listView_ItemCreated(object sender, RadListViewItemEventArgs e){ if (e.Item.ItemType == RadListViewItemType.EditItem) { RadComboBox cmb= item.FindControl("cmb") as RadComboBox; fillCombo(cmb); }}protected void fillCombo(RadComboBox cmb){ cmb.DataSource = MngCon.Fill(); cmb.DataTextField = "VALUE"; cmb.DataValueField = "KAYITNO"; cmb.DataBind();}...
The problem is that when I press edit button EditItemTemplate thow exception;
Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.
What can I do for this situation ?
PS: I'm sure that Bind("KAYITNO") value is exists in comboBox items.