Add an image icon in GridColumnGroup

2 posts, 0 answers
  1. Jignesh
    Jignesh avatar
    18 posts
    Member since:
    Dec 2011

    Posted 19 Sep Link to this post

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

    Is there a way to add it?

  2. Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 22 Sep Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top