RadGrid for ASP.NET

RadGrid Send comments on this topic.
GridGroupPanel Class
See Also  Members   Example 
Telerik.WebControls Namespace : GridGroupPanel Class


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

Object Model



 

Namespace: Telerik.WebControls
Assembly: RadGrid (in RadGrid.dll)

Syntax

Visual Basic (Declaration) 
Public Class GridGroupPanel 
   Inherits WebControl
Visual Basic (Usage)Copy Code
Dim instance As GridGroupPanel
C# 
public class GridGroupPanel : WebControl 

Example

C#Copy Code
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;
               }
           }
       }
}
    
Visual BasicCopy Code
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

Remarks

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

Inheritance Hierarchy

System.Object
   System.Web.UI.Control
      System.Web.UI.WebControls.WebControl
         Telerik.WebControls.GridGroupPanel

Requirements

Namespace: Telerik.WebControls

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

Assembly: RadGrid (in RadGrid.dll)

See Also