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

Massive Data with Multi Columns and LoadOnDemand

2 Answers 132 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Bilal
Top achievements
Rank 1
Bilal asked on 02 Dec 2011, 05:33 PM
Hi Telerik Team,

I'm using the ComboBox with Multi Columns using the OnItemsRequested event and LoadOnDemand.

However my datatable is about 100K records. How can I handle this in RadComboBox?
It is giving me error: "Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property."

The idea is I do not want to change the maxJsonLength property. I want the ComboBox to load only the items requested and not all the data once with the EnableVirtualScrolling property enabled.

Please do let me know how can I achieve such scenario.

P.S.: I do not want to go with RadGrid inside the RadComboBox.

Thanks,
Bilal

2 Answers, 1 is accepted

Sort by
0
Bilal
Top achievements
Rank 1
answered on 04 Dec 2011, 10:47 PM
Any reply please?
0
Accepted
Dimitar Terziev
Telerik team
answered on 07 Dec 2011, 01:03 PM
Hi Bilal,

Usually when the load on demand is used the main idea is to load data based on the text enter by the user.
Please refer to the following demo showing such approach. If you take a closer look at the following method you could examine how this is achieved:
private static DataTable GetData(string text)
     {
         SqlDataAdapter adapter = new SqlDataAdapter("SELECT * from Customers WHERE CompanyName LIKE @text + '%'",
             ConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ConnectionString);
         adapter.SelectCommand.Parameters.AddWithValue("@text", text);
           
         DataTable data = new DataTable();
         adapter.Fill(data);
           
         return data;
     }


All the best,
Dimitar Terziev
the Telerik team
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 their blog feed now
Tags
ComboBox
Asked by
Bilal
Top achievements
Rank 1
Answers by
Bilal
Top achievements
Rank 1
Dimitar Terziev
Telerik team
Share this question
or