Using radcombobox datavaluefield

Thread is closed for posting
2 posts, 0 answers
  1. Tal
    Tal avatar
    22 posts
    Member since:
    May 2013

    Posted 06 Aug 2013 Link to this post

    I have a code of a radComboBox which is bind to a table with only 2 columns : agentID & agentName.
    I set up dataTextField to agentName, and dataValueField to agentID. 
    The user can select in the comboBox the name of the agent, but when submitting the form the selectedValue returns null.

    Any Ideas why ?

    Thank you!
    <telerik:RadComboBox ID="agentID_cmb" Runat="server" AutoPostBack="True"
                                        DataSourceID="SqlDataSource1" DataTextField="agentName" DataValueField="agentID"
                                        ontextchanged="agentID_cmb_TextChanged" Skin="Office2007">
                                    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
                                        ConnectionString="<%$ ConnectionStrings:1122ConnectionString %>"
                                        SelectCommand="SELECT [agentID],[agentName] FROM [tblagents]"></asp:SqlDataSource>

  2. Nencho
    Nencho avatar
    1711 posts

    Posted 09 Aug 2013 Link to this post

    Hello Tal,

    I tried to replicate the described issue, base on the provided code snippet, but to no avail. Here is a video, demonstrating the behavior at my end. Please let me know if I had missed something. In addition, would you specify the version of our controls that you are using at your end?

    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 the blog feed now.
Back to Top