This is a migrated thread and some comments may be shown as answers.

Add an image icon in GridColumnGroup

1 Answer 125 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jignesh
Top achievements
Rank 1
Jignesh asked on 19 Sep 2016, 04:01 PM

I need to add an image icon in GridColumnGroup near the column text.

Is there a way to add it?

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 22 Sep 2016, 08:58 AM
Hi Jignesh,

You can use the following approach to achieve this requirement:
protected void Page_PreRenderComplete(object sender, EventArgs e)
{
    GridHeaderItem header = RadGrid1.MasterTableView.GetItems(GridItemType.Header)[0] as GridHeaderItem;
    foreach (GridTableHeaderCell cell in header.Cells)
    {
        if (cell.ColumnSpan > 1 || cell.Text == "Col Group Text")
        {
            cell.Text = cell.Text + "<img src='arrowUp.png' alt='Col Group Image' />";
        }
    }
}

I hope this will prove helpful.

Regards,
Eyup
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Grid
Asked by
Jignesh
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or