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

Question on Data loading

4 Answers 84 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Ed Lance
Top achievements
Rank 1
Ed Lance asked on 13 Sep 2012, 12:11 AM
Is it correct that the AutoCompletebox loads the entire data, then filters it?  I would have thought that it would use a parameterized query to limit the loading. The scenario I would use this for has several thousand rows ( and always increasing).  Not sure which would be worse, making the page initially wait while everything loads, or repeated hits on the database as the user types.

Does the loaded data end up in Viewstate?  The apps Viewstate is already getting really huge.

Thanks

4 Answers, 1 is accepted

Sort by
0
Ivana
Telerik team
answered on 13 Sep 2012, 06:34 AM
Hi Ed,

RadAutoCompleteBox does the items' filtering on the server. This means that only the data matching the user input will be loaded on the client.
For example, if you have the Filter property set to "StartsWith" only the matches that start with the text typed in the input area will be loaded on the client.
The following help article explains more on the RadAutoCompleteBox's filtering: http://www.telerik.com/help/aspnet-ajax/autocompletebox-filtering.html.

I hope this will help!

Regards,
Ivana
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.
0
Ed Lance
Top achievements
Rank 1
answered on 13 Sep 2012, 04:12 PM
Thank you, but my question was not about what goes to the client, but what is pulled from the database on the server side.

Looks to me like you are not sending parameters to the database, but rather pulling an entire record set, and then filtering in the control. 
0
Mbott
Top achievements
Rank 1
answered on 14 Sep 2012, 01:39 PM
Yeah, I have a similar concern about performance of this controrl with datasets that have thousands of rows.  I tried caching the dataset and then have the control read from the cached ds, but I get a javascrip alert "object reference..." error.
0
Ivana
Telerik team
answered on 17 Sep 2012, 01:33 PM
Hi Ed,

Unfortunately, when a request to the server is initiated all the data from the database is retrieved. Then the data is filtered on the server, and the result is sent to the client. This, however, is different when the RadAutoCompleteBox is bound to a web service; here you are given the possibility to configure the query to the database in a way that it is a less time consuming.

We  are already contemplating on changing the way the data is retrieved from the database. This will probably be a task scheduled with a high priority for the next major release.

I am very sorry for the inconvenience caused.

Regards,
Ivana
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
AutoCompleteBox
Asked by
Ed Lance
Top achievements
Rank 1
Answers by
Ivana
Telerik team
Ed Lance
Top achievements
Rank 1
Mbott
Top achievements
Rank 1
Share this question
or