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

Currentrow Details

1 Answer 37 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Joe Bohen
Top achievements
Rank 1
Joe Bohen asked on 04 May 2011, 10:44 AM
I have two gridviews on a form, each is grouped by the same column name. I want to capture the text in the group header of gridview1 as the groupexpanded event fires but when I attempt to get this information using 'sender.currentrow.headertext' visual studio crashes.

When I have the information I want to loop through the rows in gridview2 and expand the equivalent group if one exists.

Is this a bug or is my approach wrong?

1 Answer, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 05 May 2011, 10:15 AM
Hello,

If I understand you correctly, then you can get the text from the group that you are expanding in the following way:
void radGridView1_GroupExpanded(object sender, GroupExpandedEventArgs e)
{
    MessageBox.Show(this.radGridView1.CurrentRow.Group.HeaderRow.HeaderText);
}

Hope that helps, but please let me know if you have any questions
Richard
Tags
GridView
Asked by
Joe Bohen
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Share this question
or