arif arain
arif arain

Reputation: 3

RadComboBox maximum number of Items bind

I am using binding 80000 number of data table to the RadComboBox while binding an error generated.

<telerik:RadComboBox ID="cboxEmployeeFrom" runat="server" >
</telerik:RadComboBox>


cboxEmployee.DataSource = dts
cboxEmployee.DataTextField = dts.Columns("Name").ToString()
cboxEmployee.DataValueField = dts.Columns("EMPNO").ToString()
cboxEmployee.DataBind()

Error is:

Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.

Upvotes: 0

Views: 719

Answers (1)

Seano666
Seano666

Reputation: 2238

80,000 is too much for the code to handle, and even if it worked it would be too much for the user to handle. Consider using the ShowMoreResultsBox property as detailed here. RadComboBox set number of items to display

cboxEmployee.ShowMoreResultsBox = true;

Upvotes: 1

Related Questions