New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

Traversing Items in Group Panel

You can iterate through the items placed in the group panel of a grid and modify their settings. This can be done quite easily using the PreRender event of the grid. The items in the group panel can be accessed using the RadGrid.GroupPanel.GroupPanelItems collection.

The following example illustrates how this is done. It changes the ImageUrl for the sorting image button of each group panel item and set its CausesValidation property to false (to avoid validation on click):

C#
protected void RadGrid1_PreRender(object sender, System.EventArgs e)
{
    foreach (TableCell cell in RadGrid1.GroupPanel.GroupPanelItems)
    {
        foreach (Control ctrl in cell.Controls)
        {
            if (ctrl is ImageButton)
            {
                ImageButton button = ctrl as ImageButton;
                button.ImageUrl = "<my_img_url>";
                button.CausesValidation = false;
            }
        }
    }
}
Not finding the help you need?
Contact Support