This is a migrated thread and some comments may be shown as answers.

RadComboBox gives empty value but asp:dropdownlist works!

1 Answer 93 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
SK
Top achievements
Rank 1
SK asked on 11 Jan 2013, 08:22 PM
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:

<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!

1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 14 Jan 2013, 01:43 PM
Hello SK,

I noticed that you sent us an identical support ticket (Ticket ID : 647924). I would like to ask you to continue our conversation in the other ticket in order to keep the correspondence consistent.

All the best,
Nencho
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ComboBox
Asked by
SK
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Share this question
or