I am dynamically loading the radcombobox in my program and getting emptyvalue when quering SelectedValue. This is working just fine with asp.net dropdownbox:
In the aspx file I have:
in the cs file I have in the itemdatabound of the repeater:
Now when I save the value I am doing ddlPay.SelectedValue and it gives empty string.
It is interesting to see if I change the RadCombobox to asp:DropDownList, it works just fine!
In the aspx file I have:
<
asp:Repeater
ID
=
"rptTI"
runat
=
"server"
EnableViewState
=
"false"
>
<
ItemTemplate
>
<
telerik:RadCombobox
ID
=
"ddlPay"
runat
=
"server"
AutoPostBack
=
"False"
/>
</
ItemTemplate
>
</
asp:repeater
>
in the cs file I have in the itemdatabound of the repeater:
protected
void
OnItemDataBound(Object sender, RepeaterItemEventArgs e)
{
DropDownList ddlPay = ((DropDownList)e.Item.FindControl(
"ddlPay"
));
ddlPay.DataSource = payrollDataView;
ddlPay.DataTextField =
"value"
;
ddlPay.DataValueField =
"id"
;
ddlPay.DataBind();
}
Now when I save the value I am doing ddlPay.SelectedValue and it gives empty string.
It is interesting to see if I change the RadCombobox to asp:DropDownList, it works just fine!