我正在使用绑定80000数量的数据表到RadComboBox,同时绑定生成的错误。
<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 during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
答案 0 :(得分:1)
80,000对于代码来说太过分了,即使它起作用也不会让用户处理太多。请考虑使用ShowMoreResultsBox属性,如此处所述。 RadComboBox set number of items to display
cboxEmployee.ShowMoreResultsBox = true;