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

How to Focus/Select Group header

3 Answers 150 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Boo
Top achievements
Rank 2
Boo asked on 15 Nov 2012, 02:11 AM
How to Focus/Select Group header like focus/select rows
I used like these

GridViewGroupRowInfo groupHeader = (GridViewGroupRowInfo)_MyGrid.CurrentRow;
....
....
_MyGrid.Groups[groupHeader.Index].GroupRow.IsCurrent  = true;
_MyGrid.Groups[groupHeader.Index].GroupRow.IsSelected = true;


But it's does not work.
How do I do?
Thank you.

3 Answers, 1 is accepted

Sort by
0
Emanuel Varga
Top achievements
Rank 1
answered on 15 Nov 2012, 09:13 AM
Hello,

Could you please provide some more details on what you are trying to accomplish?

Screenshots or anything that will help me understand what you are trying to achieve?

(the same goes for your other post)


Best Regards,
Emanuel Varga
WinForms MVP
0
Boo
Top achievements
Rank 2
answered on 15 Nov 2012, 09:38 AM
 Hi Emanuel Varga,

     I have attached an example to select or focus group header on grid.
In the example after I added row (D 4.2) and I need to focus/select header D4 somethings like that.

Thank you
Boo.
0
Accepted
Emanuel Varga
Top achievements
Rank 1
answered on 15 Nov 2012, 10:56 AM
Hello Boo,

In order to make the Group Header row the current row (selected) it is enough to just set that row as the grid.CurrentRow, like so:
grid.CurrentRow = grid.Groups[0].GroupRow;

If you have any other questions, please let me know.

Best Regards,
Emanuel Varga
WinForms MVP
Tags
GridView
Asked by
Boo
Top achievements
Rank 2
Answers by
Emanuel Varga
Top achievements
Rank 1
Boo
Top achievements
Rank 2
Share this question
or