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

Using radcombobox datavaluefield

1 Answer 191 Views
UI for ASP.NET AJAX in ASP.NET MVC
This is a migrated thread and some comments may be shown as answers.
Tal
Top achievements
Rank 1
Tal asked on 06 Aug 2013, 10:04 AM
Hey,
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"
                                    onselectedindexchanged="agentID_cmb_SelectedIndexChanged"
                                    ontextchanged="agentID_cmb_TextChanged" Skin="Office2007">
                                </telerik:RadComboBox>
                                <asp:SqlDataSource ID="SqlDataSource1" runat="server"
                                    ConnectionString="<%$ ConnectionStrings:1122ConnectionString %>"
                                    SelectCommand="SELECT [agentID],[agentName] FROM [tblagents]"></asp:SqlDataSource>

1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 09 Aug 2013, 07:10 AM
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?

Regards,
Nencho
Telerik
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.
Tags
UI for ASP.NET AJAX in ASP.NET MVC
Asked by
Tal
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Share this question
or