I am using a RadComboBox for item selection on a page in my web application. The box is loaded with possible selections based on the currently logged in user. I was running into an issue where no matter what item I select in the RadComboBox, the SelectedValue is always -1 and the SelectedIndex is always 0 no matter which item I select, while the Text property is accurate. I searched many posts and saw possibilities surrounding page postback but I am checking for a Not Postback before loading the box. My RadComboBox is on the page as follows:
<telerik:RadComboBox ID="rcbRetailProducer" runat="server" Width="224px"
EnableLoadOnDemand="false" HighlightTemplatedItems="true"
MarkFirstMatch="true" ForeColor="black" BackColor="white" AllowCustomText="false"
DropDownWidth="350px">
</telerik:RadComboBox>
In the Code behind in the PageLoad event I have"
If Not Page.IsPostBack Then
.....
PopulateFormFields()
.....
End If
And within the PopulateFormFields code block I have:
The RadComboBox gets filled with all possibilities, but no matter what I select when I place a break in my code and check the SelectedValue and SelectedIndex properties, SelectedValue is -1 and SelectedIndex is 0
There are a small handful of users in the system that have large amounts of data that can be loaded into this box, to the tune of around 2,000 - 2,500 records. Aside from these very few users, the rest of the user base has maybe a few hundred. I modified the procedure that loads the retailDS dataset shown above to return only 10 records, and when I did that everything works fine!! So, can the radcombobox not handle large lists? If not, what is the max? Right now if this RadComboBox returns 2500 records then SelectedValue and SelectedIndex never hold the proper value....but they work fine with the exact same code if I limit the dataset to less records.
<telerik:RadComboBox ID="rcbRetailProducer" runat="server" Width="224px"
EnableLoadOnDemand="false" HighlightTemplatedItems="true"
MarkFirstMatch="true" ForeColor="black" BackColor="white" AllowCustomText="false"
DropDownWidth="350px">
</telerik:RadComboBox>
In the Code behind in the PageLoad event I have"
If Not Page.IsPostBack Then
.....
PopulateFormFields()
.....
End If
And within the PopulateFormFields code block I have:
Dim retailDS As New DataSet
MyBase.ErrHdlr(DBLists.GetRetailProducersDDL(retailDS))
Me.rcbRetailProducer.DataSource = retailDS.Tables(0)
Me.rcbRetailProducer.DataTextField = "Name"
Me.rcbRetailProducer.DataValueField = "Value"
Me.rcbRetailProducer.DataBind()
Me.rcbRetailProducer.Items.Insert(0, New RadComboBoxItem(" ", "-1"))
The RadComboBox gets filled with all possibilities, but no matter what I select when I place a break in my code and check the SelectedValue and SelectedIndex properties, SelectedValue is -1 and SelectedIndex is 0
There are a small handful of users in the system that have large amounts of data that can be loaded into this box, to the tune of around 2,000 - 2,500 records. Aside from these very few users, the rest of the user base has maybe a few hundred. I modified the procedure that loads the retailDS dataset shown above to return only 10 records, and when I did that everything works fine!! So, can the radcombobox not handle large lists? If not, what is the max? Right now if this RadComboBox returns 2500 records then SelectedValue and SelectedIndex never hold the proper value....but they work fine with the exact same code if I limit the dataset to less records.