Items disappear

Thread is closed for posting
2 posts, 0 answers
  1. eBuddy
    eBuddy avatar
    13 posts
    Member since:
    Jan 2012

    Posted 29 Feb 2012 Link to this post


    Okay, remvoed prev description :)
    Bug is that if i use OBservableCollection as itemsSource and on CollectionChanged event make BringIntoView(Items.Last()) - i get an exception that item is not in ItemsSource .

    Using timer to postpone makes situation better but of course isn't a good solution

    Ticket name is wrong.  Don't know how to update
  2. Deyan
    Deyan avatar
    2147 posts

    Posted 01 Mar 2012 Link to this post

    Hi eBuddy,

    Thanks for contacting us.

    Well, the reason for the erroreous behavior is that you are handling the CollectionChanged earlier than we do and since we create an internal representation of your data source when the DataBoundListBox when it's bound, the newly added item is not yet there and therefore the BringIntoView logic crashes.

    So you should either do the CollectionChanged logic on a Dispatcher call, or simply think of another way to implement the scenario.

    Let me know in case you have further questions or need assistance.

    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top