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

GridGroupPanel appears on the top of Telerik RadGrid when ShowGroupPanel of RadGrid is set to true and if AllowDragToGroup is set to true, you can drag column to the panel to group data by that column.

Group by fields (displayed in the GroupPanel) are defined through the GroupByExpressions.

Definition

Namespace:Telerik.Web.UI

Assembly:Telerik.Web.UI.dll

Syntax:

C#
public class GridGroupPanel : WebControl, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, INamingContainer

Inheritance: objectControlWebControlGridGroupPanel

Implements: IAttributeAccessorIComponentIControlBuilderAccessorIControlDesignerAccessorIDataBindingsAccessorIDisposableIExpressionsAccessorINamingContainerIParserAccessorIUrlResolutionService...

Inherited Members WebControl.AddAttributesToRender(HtmlTextWriter)WebControl.ApplyStyle(Style)WebControl.CopyBaseAttributes(WebControl)WebControl.CreateControlStyle()WebControl.MergeStyle(Style)WebControl.RenderBeginTag(HtmlTextWriter)WebControl.RenderEndTag(HtmlTextWriter)WebControl.RenderContents(HtmlTextWriter)WebControl.AccessKeyWebControl.AttributesWebControl.BackColorWebControl.BorderColorWebControl.BorderWidthWebControl.BorderStyleWebControl.ControlStyleWebControl.ControlStyleCreatedWebControl.CssClassWebControl.DisabledCssClassWebControl.StyleWebControl.EnabledWebControl.EnableThemingWebControl.FontWebControl.ForeColorWebControl.HasAttributesWebControl.HeightWebControl.IsEnabledWebControl.SupportsDisabledAttributeWebControl.SkinIDWebControl.TabIndexWebControl.TagNameWebControl.ToolTipWebControl.WidthControl.ResolveAdapter()Control.HasEvents()Control.GetRouteUrl(object)Control.GetRouteUrl(string, object)Control.GetRouteUrl(RouteValueDictionary)Control.GetRouteUrl(string, RouteValueDictionary)Control.GetUniqueIDRelativeTo(Control)Control.ApplyStyleSheetSkin(Page)Control.OnDataBinding(EventArgs)Control.DataBind()Control.DataBind(bool)Control.DataBindChildren()Control.EnsureID()Control.OnInit(EventArgs)Control.ClearChildState()Control.ClearChildControlState()Control.ClearChildViewState()Control.ClearEffectiveClientIDMode()Control.ClearCachedClientID()Control.Focus()Control.LoadControlState(object)Control.MapPathSecure(string)Control.OpenFile(string)Control.OnLoad(EventArgs)Control.BuildProfileTree(string, bool)Control.SaveControlState()Control.RenderChildren(HtmlTextWriter)Control.RenderControl(HtmlTextWriter)Control.RenderControl(HtmlTextWriter, ControlAdapter)Control.OnUnload(EventArgs)Control.Dispose()Control.RaiseBubbleEvent(object, EventArgs)Control.AddedControl(Control, int)Control.CreateControlCollection()Control.ResolveUrl(string)Control.ResolveClientUrl(string)Control.FindControl(string)Control.FindControl(string, int)Control.GetDesignModeState()Control.HasControls()Control.IsLiteralContent()Control.EnsureChildControls()Control.RemovedControl(Control)Control.SetDesignModeState(IDictionary)Control.SetRenderMethodDelegate(RenderMethod)Control.ClientIDModeControl.ClientIDControl.ClientIDSeparatorControl.ContextControl.AdapterControl.DesignModeControl.EventsControl.IDControl.IsChildControlStateClearedControl.EnableViewStateControl.ViewStateModeControl.IsViewStateEnabledControl.NamingContainerControl.IdSeparatorControl.LoadViewStateByIDControl.PageControl.RenderingCompatibilityControl.TemplateControlControl.ParentControl.TemplateSourceDirectoryControl.AppRelativeTemplateSourceDirectoryControl.SiteControl.VisibleControl.UniqueIDControl.HasChildViewStateControl.ControlsControl.ValidateRequestModeControl.ViewStateControl.ViewStateIgnoresCaseControl.ChildControlsCreatedControl.IsTrackingViewStateControl.DisposedControl.DataBindingControl.InitControl.LoadControl.PreRenderControl.Unloadobject.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Example:

csharp
protected void RadGrid1_PreRender(object sender, System.EventArgs e)
{
        TableCell cell;

        foreach (cell in RadGrid1.GroupPanel.GroupPanelItems)
        {
            Control ctrl;
            foreach (ctrl in cell.Controls)
            {
                if (ctrl is ImageButton)
                {
                    ImageButton button = ctrl as ImageButton;
                    button.ImageUrl = "<my_img_url>";
                    button.CausesValidation = false;
                }
            }
        }
}
csharp
Protected Sub RadGrid1_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGrid1.PreRender
        Dim cell As TableCell

        For Each cell In RadGrid1.GroupPanel.GroupPanelItems
            Dim ctrl As Control
            For Each ctrl In cell.Controls
                If (Typeof ctrl Is ImageButton) Then
                    Dim button As ImageButton = CType(ctrl, ImageButton)
                    button.ImageUrl = "<my_img_url>"
                    button.CausesValidation = False
                End If
            Next ctrl
        Next cell
End Sub

Constructors

For internal usage only.

C#
public GridGroupPanel()

Properties

Gets a collection of items displayed in the group panel. These items represent the GroupByFields used for Telerik RadGrid grouping.

C#
[Browsable(false)]
public List<GroupItemCell> GroupPanelItems { get; }
Example:
cs-api-definition
protected void RadGrid1_PreRender(object sender, System.EventArgs e)
{
TableCell cell;

foreach (cell in RadGrid1.GroupPanel.GroupPanelItems)
{
Control ctrl;
foreach (ctrl in cell.Controls)
{
if (ctrl is ImageButton)
{
ImageButton button = ctrl as ImageButton;
button.ImageUrl = "&lt;my_img_url&gt;";
button.CausesValidation = false;
}
}
}
}

Gets the style that will be used for the group panel items.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public GridPanelItemsStyle PanelItemsStyle { get; }
Example:
C#
&lt;GroupPanel Text="Drag a column here."&gt;
&lt;PanelStyle BackColor="Aqua" BorderStyle="Dotted" /&gt;
&lt;PanelItemsStyle BackColor="Black" Font-Italic="true"/&gt;
&lt;/GroupPanel&gt;

Gets the style that will be used for the group panel.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public GridGroupPanelStyle PanelStyle { get; }
Example:
C#
&lt;GroupPanel Text="Drag a column here."&gt;
&lt;PanelStyle BackColor="Aqua" BorderStyle="Dotted" /&gt;
&lt;/GroupPanel&gt;
C#
protected override HtmlTextWriterTag TagKey { get; }

Overrides: WebControl.TagKey

Gets or sets the text displayed in the group panel to urge the user dragging a column to group by.

C#
public virtual string Text { get; set; }

Note that the GroupPanel Text has a default value, so you don't need to set it generally.

Example:
C#
&lt;GroupPanel Text="Drag here the column you need to group by."&gt;&lt;/GroupPanel&gt;

Methods

C#
protected override void AddParsedSubObject(object obj)
Parameters:objobject

Overrides: Control.AddParsedSubObject(object)

C#
protected override void CreateChildControls()

Overrides: Control.CreateChildControls()

C#
protected override void LoadViewState(object savedState)
Parameters:savedStateobject

Overrides: WebControl.LoadViewState(object)

C#
protected override bool OnBubbleEvent(object source, EventArgs args)
Parameters:sourceobjectargsEventArgsReturns:

bool

Overrides: Control.OnBubbleEvent(object, EventArgs)

C#
protected override void OnPreRender(EventArgs e)
Parameters:eEventArgs

Overrides: Control.OnPreRender(EventArgs)

C#
protected override void Render(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: WebControl.Render(HtmlTextWriter)

C#
protected override object SaveViewState()
Returns:

object

Overrides: WebControl.SaveViewState()

C#
protected override void TrackViewState()

Overrides: WebControl.TrackViewState()