We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Autocomplete slow in ggc

I have a dropdown list of about 24000 items that binds to grid and users choose from. I have tried the examples from ListItemReference and ForeignKeyReference which work well except for the fact that the autocomplete is dreadfully slow.

I have implemented the underlying lists myself, but do not see it entering the find, binarysearch methods etc. of ICollection or IBindingList etc. Any suggestions on how I might improve the speed ? Can I intercept the search method somehow?

Thanks,
Scott

3 Replies

SD Scott Dubose October 17, 2007 07:04 PM UTC

Interesting, I find that when setting a celltype to combobox and the datasource to a custom collection list, it is calling the IBindingList.Find method. Not sure why it is different when adding list as a grid relation.

Thanks,
Scott


SD Scott Dubose October 18, 2007 07:17 PM UTC

--Bump--

Any suggestions anyone? I really need help on this. I've looked back through all the other posts on "autocomplete" but see no solution for this.


HA haneefm Syncfusion Team October 25, 2007 06:55 PM UTC

Hi Scott,

The reason for getting the behavior is that the grid tries to find its key by iterating in the collection of items. This happens each time when user inputs a character. Iterating through 30000+ items for every character causes this delay. To solve this issue, the user has to override this written logic. For this, the custom cell type for foreign key relation has to be made. This can be achieved by deriving the GridTableDropDownListCellModel and GridTableDropDownListCellRenderer classes. In the derived renderer, the FindItem method is override and logic has to be rewritten to required behavior.

Please refer this sample;
http://websamples.syncfusion.com/samples/Grid.Windows/I34619/main.htm

It has a custom foreign key look up celltype that assumes the foreign key list is ordered (ascending) by the display value so it can do a binary search in a renderer.FindItem override. (Note that once an item is found using a binary search, the FindItem uses a linear search to move back up in the list to locate the first item that matches.)

Best regards,
Haneef

Note :
Doc : GridfindLogic.zip

Loader.
Live Chat Icon For mobile
Up arrow icon