IList and DataBoundListBox

Thread is closed for posting
2 posts, 0 answers
  1. Shawn
    Shawn avatar
    30 posts
    Member since:
    Mar 2011

    Posted 16 May 2012 Link to this post

    I have an implementation of an IList collection specifically to speed virtualization of a list that I want to show via the DataBoundListBox (we're porting it from a LazyListBox implementation from the WP7 team). Currently we've not implemented GetEnumerator on our collection because that would be very slow (as the collection may have 50K+ items in it. The use case is that we usually use BringItemIntoView to move the listbox as the user types in the SIP. While porting this functionality to DBLB you're calling our GetEnumerator. We could implement it but I think this would just cause you to read the entire list instead of using our indexer (via the IList). 

    Can you suggest the correct way to get the best perf from the DBLB? 

    The underlying object that the collection wraps is a Perst database index so there is a lookup from an index object (via ordinal row position) if that explains why we're not just loading up a full collection in memory.

    If you need a repro-case to explain, I can supply (but it's non trivial).
  2. Deyan
    Deyan avatar
    2147 posts

    Posted 17 May 2012 Link to this post

    Hello Shawn,

    Thanks for writing and for your question.

    In RadDataBoundListBox we internally perform some data processing when a source is assigned and therefore we need the GetEnumerator method. However, your scenario sounds like a good candidate for using our VirtualizingDataCollection class which allows for binding the listbox to large amounts of data sets without having to load all the data at start.

    Can you please take a look at this help article which gives some hints on using this collection and let us know whether it will do the job for you?:

    All the best,
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top