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

GroupRowIsExpandedChanging - state of GroupRowCancelEventArgs

1 Answer 71 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Chad
Top achievements
Rank 1
Chad asked on 24 Jun 2011, 03:23 PM
Hi,

I want to have the a RadGridView with group rows, where the group rows start out expanded, and cannot be collapsed.  The way I am currently doing this is with the following:

private void _mainGrid_GroupRowIsExpandedChanging(object sender, GroupRowCancelEventArgs e)
{
      if (!e.Row.IsExpanded)
      {
          e.Cancel = true;
      }
}

I observe that e.Row.IsExpanded is true when the row is changing to be expanded.  The documentation says that this event "Occurs when a group row's expanded state is about to be changed."  Is the state of e.Row correct / Is it supposed to show the state of that the row WILL be in after the change?  I'm fine with it as it is now...  but if it is supposed to be the current state of the row (before the change), I want to know so I can watch the change logs so my code works the way I want to after updates.

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 29 Jun 2011, 04:58 PM
Hello Chad,

Yes, the state of the e.Row is correct. It is showing the value as it is about to be changed (if you do not cancel the change). 

It will continue to work this way. Just in case that we introduce some breaking change in the grouping mechanism, then this will be described in the the Changes and Backward Compatibility section in the Upgrade manual.
Thank you for your understanding.

Regards,
Didie
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
Chad
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or