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

How to move to next row or move previous?

1 Answer 104 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Doug Cvelbar
Top achievements
Rank 1
Doug Cvelbar asked on 21 Apr 2010, 03:48 PM

The customer wants a "move next" and "move previous" button toward the bottom of the page (not on the grid itself). I was able to accomplish this "almost". As in a lot of things I've tried to accomplish in silverlight I get 98% there and find something that isn't quite right.

Here is my current code:
=========================================================================

 

 

    DomainDataSourceView ddsv = (DomainDataSourceView)rgvNotes.ItemsSource;

 

 

    if (!ddsv.MoveCurrentToNext())

 

    {

        ddsv.MoveCurrentToFirst();

    }

    rgvNotes.CurrentItem = ddsNotes.DataView.CurrentItem;

    rgvNotes.SelectedItem = ddsNotes.DataView.CurrentItem;
...


*NOTE: Code similar for "Move Previous"
==========================================================================

The issue occurs when a column is clicked and the data is sorted. The dataview order doesn't change and I can't find the list that is sorted. I know a sort descriptor is attached to the gridview but I have not figured out how to get the sorted list, find next or previous, and select it.

I did find something in the notes about a "GridNavigator" but that does not appear to be on the silverlight control. Is there a newer silverlight version of the control with this functionality? We are currently on SL3 and hopefully moving to SL4/VS2010 very soon.

Thanks!

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 22 Apr 2010, 08:05 AM
Hi Doug,

I suggest you to wait for our upcoming service pack (expected later today) and use the grid Items instead DomainDataSourceView in your case. Since Items is ICollectionView you will find the same methods. This collection will respect all grid operations including sorting, filtering, grouping, paging, etc.

Sincerely yours,
Vlad
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.
Tags
GridView
Asked by
Doug Cvelbar
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or