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

how to scroll as items are added to the grid

2 Answers 26 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Derek Ealy
Top achievements
Rank 1
Derek Ealy asked on 31 Mar 2010, 11:37 PM
Hi

I'm using a RadGridView in SL 3, I need it to scroll down to the last item of in the grid as each new one arrives. I haven't been able to make this happen yet. As new items are added to the container bound to the grid I tried calling setting
grid.SelectedItem = newItem;
grid.CurrentItem = newItem;
grid.SetIsSelected(newItem, true);

None of these worked though, the grid always stays at the top.

Any suggestions?

Thanks, Derek

2 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 01 Apr 2010, 06:37 AM
Hello Derek Ealy,

You could try using the ScrollIntoView method, which will bring intro view the specified data item:

1.this.grid.ScrollIntoView(newItem);

Just make sure that the container that host the data items implements INotifyCollectionChanged . This will allow the grid to be notified when items have changed.


Sincerely yours,
Milan
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Derek Ealy
Top achievements
Rank 1
answered on 01 Apr 2010, 04:08 PM
Doh, I saw that method earlier and thought was meant something else, I shoulda looked closer.

Thanks, that worked the treat.

Derek
Tags
GridView
Asked by
Derek Ealy
Top achievements
Rank 1
Answers by
Milan
Telerik team
Derek Ealy
Top achievements
Rank 1
Share this question
or