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

How to expand the last group in the grid ?

2 Answers 45 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Marc Roussel
Top achievements
Rank 2
Marc Roussel asked on 19 Jul 2010, 06:22 PM
If I want to select the last line with this :

if (_Jobs.Count > 0)
{
    rgvJobs.SelectedItem = _Jobs[_Jobs.Count - 1];
    rgvJobs.ScrollIntoView(_Jobs[_Jobs.Count - 1]);
}

It doesn't when the grid is groupped
so I guess I have to expand the last group before using the code above ?

2 Answers, 1 is accepted

Sort by
0
Accepted
Milan
Telerik team
answered on 20 Jul 2010, 05:17 AM
Hello Marc Roussel,

You just have to replace ScrollIntoView with ScrollIntoViewAsync and groups will be expanded automatically. For example:

if (_Jobs.Count > 0) 
    rgvJobs.SelectedItem = _Jobs[_Jobs.Count - 1]; 
    rgvJobs.ScrollIntoViewAsync(_Jobs[_Jobs.Count - 1], null); 
}


Kind regards,
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
Marc Roussel
Top achievements
Rank 2
answered on 20 Jul 2010, 12:57 PM
Great.  Thank you
Tags
GridView
Asked by
Marc Roussel
Top achievements
Rank 2
Answers by
Milan
Telerik team
Marc Roussel
Top achievements
Rank 2
Share this question
or