or
Protected Sub gvAccounts_GroupsChanging(sender As Object, e As GridGroupsChangingEventArgs) Handles gvAccounts.GroupsChanging
If (e.Action = GridGroupsChangingAction.Group) Then
gvAccounts.AllowPaging = False
gvAccounts.MasterTableView.GetColumnSafe(e.Expression.GroupByFields(0).FieldName).Visible = False
gvAccounts.MasterTableView.CommandItemSettings.ShowExportToExcelButton = False
gvAccounts.MasterTableView.CommandItemSettings.ShowExportToPdfButton = False
ElseIf (e.Action = GridGroupsChangingAction.Ungroup) Then
IF ''add some code here to check if there are any grouped columns, if false then
gvAccounts.MasterTableView.CommandItemSettings.ShowExportToExcelButton = True
gvAccounts.MasterTableView.CommandItemSettings.ShowExportToPdfButton = True
End If
gvAccounts.AllowPaging = True
gvAccounts.MasterTableView.GetColumnSafe(e.Expression.GroupByFields(0).FieldName).Visible = True
End If
End Sub
RadGrid.MasterTableView.Font.Size = FontUnit.XXSmall;