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

Programmatically jump to next/prev row between groups

0 Answers 56 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Paweł
Top achievements
Rank 1
Paweł asked on 08 Aug 2012, 02:15 PM
Hello!
I'm designing RadGridView and I've got case.
First of all - here is my code:
var cmd = default(RoutedUICommand);
switch (newVal)
{
    case Go.Previous:
        {
            cmd = RadGridViewCommands.MoveUp as RoutedUICommand;
        }
        break;
    case Go.Next:
        {
            cmd = RadGridViewCommands.MoveDown as RoutedUICommand;
        }
        break;
}
if (cmd != null && cmd.CanExecute(null, gridView))
{
    cmd.Execute(null, gridView);
    var selectCmd = RadGridViewCommands.SelectCurrentUnit as RoutedUICommand;
    if (selectCmd != null && selectCmd.CanExecute(null, gridView))
    {
        selectCmd.Execute(null, gridView);
    }
}


When I'm going next element to end of group and try to pass to the next group next group is opening, but first element of second group is not selected (!). When I hit "next" button second time - second item of second group selects just passing first.
How can I manage it? I tough about event handler to select first element of just opened group, but GroupRowIsExpandedChanging is not working.
Kind regards!

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Paweł
Top achievements
Rank 1
Share this question
or