Strategy for binding to a very large collection?

3 posts, 0 answers
  1. Patrick Holloway
    Patrick Holloway avatar
    13 posts
    Member since:
    Sep 2009

    Posted 21 Oct 2009 Link to this post

    I have a combo box which I need to bind to a collection of (don't laugh) 5000+ items. As you might expect, performance goes straight to heck. I am curious as to whether anyone else has faced this scenario and how you dealt with it. I realize that this may not be a UI thing; however, would it be possible to use some sort of paging in conjunction with the Telerik controls while still supporting some sort of input lookup (e.g. user types "foo" into control, we fetch a chunk of data which starts with those characters)?

    Just looking for ideas, but complete solutions are always welcome ;)

    -p
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 22 Oct 2009 Link to this post

    Hello Patrick,

    I have a blog post, demonstrating the same scenario as yours:
    http://blogs.telerik.com/valerihristov/posts/08-12-04/auto-complete_combobox_with_wcf_service_and_radcontrols_for_silverlight.aspx

    Other option, in case you already have all data on the client, would be to set ItemsPanel of RadComboBox to be VirtualizedStackPanel:
    <telerikInput:RadComboBox ...>
    <telerikInput:RadComboBox.ItemsPanel>
        <ItemsPanelTemplate>
            <VirtualizedStackPanel />
        </ItemsPanelTemplate>
    </telerikInput:RadComboBox.ItemsPanel>
    </telerikInput:RadComboBox>

    This way the combo will work just fine with 5000 or more items.

    Greetings,
    Valeri Hristov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Patrick Holloway
    Patrick Holloway avatar
    13 posts
    Member since:
    Sep 2009

    Posted 22 Oct 2009 Link to this post

    Great! Thanks Valeri!

    -p
Back to Top