Hey guys we have a combo box that loads the rows asynchronously. It seems to work fine except when we try to set the selected value using ajax to a value that has not been loaded into the combo yet but it is actually part of the dataset.
Is there a way to "request" more rows using javascript so the combo box loads at least the right amount of rows so the value we are looking it's part of the rows collection?
THANKS !
Hi,
You can use the WebDropDown control (new in 2009.1) - there you can control the number of rows that are initially loaded via the PageSize and AutoFilterResultSize properties.
PageSize is used in combination of either EnableLoadOnDemand (virtual scrolling) or EnablePaging (paging feature).
AutoFilterResultSize will limit the search results when filtering on the server / client.
Hope this helps,
Angel
Yeah I'd like to see it in a feature release.
Thanks for your help.
My point is that the combo cannot be used that way for this scenario.
It's a good feature request though.
It would be nice if it could bind the rest of the rows until either the value has been found or the last row has been reached. Otherwise it seems that in order for me to take advantage of this mode I gotta work with less than 50 rows but then why would I use this fancy feature with only 50 rows?
I don't think I'm understanding this.
So if the user selects row 348 (lots of rows we need ajax) and then there is a postback, the selected index will be lost since the combo will load only 50?
I noticed though that even when the selected index is lost the data value remains.
Thanks
Unfortunately that is the nature of the combo in this mode. It tries to minimize the number of items and not bind to the whole thing. Otherwise it'd be very slow on both server and client. Maybe you could optimize the data source in some sort and bind the combo to all of the rows, assuming that after optimization the data source would contain some manageable number of rows.