New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Holds properties specific for grouping mechanism such as performed action and reference to GridTableView where the action was performed.

Definition

Namespace:Telerik.Web.UI

Assembly:Telerik.Web.UI.dll

Syntax:

C#
public class GridGroupsChangingEventArgs : EventArgs

Inheritance: objectEventArgsGridGroupsChangingEventArgs

Inherited Members EventArgs.Emptyobject.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Constructors

C#
public GridGroupsChangingEventArgs(GridTableView tableView, GridGroupByExpression expression1, GridGroupByExpression expression2, GridGroupsChangingAction action)
Parameters:tableViewGridTableViewexpression1GridGroupByExpressionexpression2GridGroupByExpressionactionGridGroupsChangingAction
C#
public GridGroupsChangingEventArgs(GridTableView tableView, GridGroupByExpression expression, GridGroupByField sortedField)
Parameters:tableViewGridTableViewexpressionGridGroupByExpressionsortedFieldGridGroupByField
C#
public GridGroupsChangingEventArgs(GridTableView tableView, GridGroupByExpression expression, GridGroupsChangingAction action)
Parameters:tableViewGridTableViewexpressionGridGroupByExpressionactionGridGroupsChangingAction

Properties

Gets a reference to GridGroupsChangingAction enumeration, which holds information about what action did fire the GroupsChanging event.

C#
public GridGroupsChangingAction Action { get; }
Example:
C#
<p>protected void RadGrid1_GroupsChanging(object source,
Telerik.Web.UI.GridGroupsChangingEventArgs e)<br />
{<br />
if (e.Action == GridGroupsChangingAction.Group)</p>
<p>{ ... }</p>

Gets or sets a value indicating whether GroupsChanging event will be canceled.

C#
public bool Canceled { get; set; }
Property Value:

true, if the event is canceled, otherwise false.

Gets or sets the GridGroupByExpression that will be used for grouping Telerik RadGrid.

C#
public GridGroupByExpression Expression { get; set; }
Example:
cs-api-definition
protected void RadGrid1_GroupsChanging(object source, Telerik.Web.UI.GridGroupsChangingEventArgs e)
{
if (e.Action == GridGroupsChangingAction.Group)
{
GridGroupByField countryGroupField = new GridGroupByField();
countryGroupField.FieldName = "Country";
GridGroupByField cityGroupField = new GridGroupByField();
cityGroupField.FieldName = "City";

e.Expression.SelectFields.Clear();
e.Expression.SelectFields.Add(countryGroupField);
e.Expression.SelectFields.Add(cityGroupField);

e.Expression.GroupByFields.Clear();
e.Expression.GroupByFields.Add(countryGroupField);
e.Expression.GroupByFields.Add(cityGroupField);
...
}
}

Gets a reference to the currently used GridGroupByField.

C#
public GridGroupByField SortedField { get; }

Gets the swap expression which represents the GridGroupByExpression with which the Expression will be swapped. The only case the value is not null is when Action property is set to Swap.

C#
public GridGroupByExpression SwapExpression { get; }
Property Value:

The swap expression which represents the GridGroupByExpression with which the Expression will be swapped. The only case the value is not null is when Action property is set to Swap.

Gets a reference to the GridTableView object where the grouping is performed.

C#
public GridTableView TableView { get; }
Property Value:

a reference to GridTableView object.