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
Here there is another sample http://www.unboxedsolutions.com/sean/archive/2006/01/21/843.aspx.
However, if the data is returned from a service, you'll want the service to just return one page. If not, the whole array of objects will be loaded anyway.
You can also try skip the DataTable step and bind directly to the array of objects, unless you have another reason to use the DataTable.
Hi, has anyone figured out how to disable/cancel client-side filtering on the webcombo?
Not yet. I had thought of some how hooking to the selectWhere() client side event and cancelling the filtering on the client side. That will be my next try when I come to it. Take a look at this post, this is where I got the idea from.
http://forums.infragistics.com/forums/t/2841.aspx
I need same functionality: be able to turn off webcombo filter and rely only on datasource select filter.
Any solution for this problem?
Thank you,
Dmitri
That is working very well now; My combo is calling my service layer and implementing paging, sorting and filtering and the service calls and SQL calls are all light and fast only return the rows that they should.Is there a way to stop the combo from doing its own filtering, but give the same behaviour as when using ComboTypeAhead = Suggest?
I would then be able to use better filtering (so no case sensitivity, use CONTAINS keyword at the back end etc)?
Thanks for your help
Thanks Andres, will give that a go.There is also an issue with filtering being case sensitive? Is there anyway to avoid this?
ThanksZack