Hi,I have a webcombo which binds to a datatable using the datasouceid property.This works great and the typeahead suggest works great as well.
The problem is that on the server, the call to populate the datatable is pretty heavy. So I assume, each time a user types something, there is a round trip to the server, my heavy call populates the datatable, your control then selects what is needs from the datatable and that is passed back to the control on the web form. For my senario, this is not very practical.
Is there any way to avoid these heavy round trips without having to hand code the whole thing in js?
Thanks for the help
Zack
Hi Zack,
What kind DataSource are you using? I guess it's loading all the records in the server side. The WebCombo tells the DataSource to retrieve only the first 20 rows that match the filter, but if the DataSource does not honor that, the filtering is done in the server by the WebCombo.
Tony wrote an article on how to enable paging using ObjectDataSource and TableAdapter. If you use the ASP.NET 3.5 LinqDataSource you will get that behavior automatically. In both cases the DataSource will just load that page from the database.
Regards,
Andres
Hi Andres,
Thanks for that, I am using a ObjectDataSource that is bound to a DataTable that is translated from a Array of Objects(Clients) that is returned from a service - so if I understand you correctly, I need to implement filtering and sorting, as well as the SelectCountMethod on the datasource (with a signature the same as SelectMethod). So the control will use those method calls on the ObjectDataSource, I need to match those in the service layer, so I won't be killing my server. I will give it try and revert.
Thanks