This is a migrated thread and some comments may be shown as answers.

Items disappear

1 Answer 90 Views
JumpList
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
eBuddy
Top achievements
Rank 1
eBuddy asked on 29 Feb 2012, 04:01 PM
Hi,

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

1 Answer, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 01 Mar 2012, 09:36 AM
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.

Regards,
Deyan
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
JumpList
Asked by
eBuddy
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Share this question
or