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

RadDataPager - update listbox/grid when source is updated

2 Answers 105 Views
DataPager
This is a migrated thread and some comments may be shown as answers.
Michael Eaton
Top achievements
Rank 1
Michael Eaton asked on 19 Oct 2011, 04:04 PM
My question is identical to this one: http://www.telerik.com/community/forums/preview-thread/wpf/gridview/raddatapager-radgridview-refresh.aspx, but unfortunately, the original poster who claimed to have solved it didn't actually post what he did. :-\

I have a RadDataPager bound to

ObservableCollection<Foo> Bar
.
<telerik:RadDataPager x:Name="radDataPager" Source="{Binding Bar}"/>

I have a listbox that has its ItemsSource set to:

<ListBox ItemsSource="{Binding PagedSource, ElementName=radDataPager}"/>

When the underlying collection 'Bar' changes, those changes aren't being reflected in the listbox and I'm not sure why.

Any thoughts?

thanks.

mike

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 21 Oct 2011, 09:16 AM
Hi,

 Can you verify if the observable collection is not recreated multiple times? This will break the collection changed listeners.  

Best wishes,
Vlad
the Telerik team

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

0
Michael Eaton
Top achievements
Rank 1
answered on 24 Oct 2011, 04:53 PM
That was it. :-) I was recreating the ObservableCollection as the items were being filtered.

Paging seems to be working now with the exception that when I page up/down, it wants to automatically select the first item on each page. :-\ 
Tags
DataPager
Asked by
Michael Eaton
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Michael Eaton
Top achievements
Rank 1
Share this question
or