Header text for clientselectcolumn

2 posts, 1 answers
  1. Tina
    Tina avatar
    130 posts
    Member since:
    Jul 2011

    Posted 20 Apr 2012 Link to this post

    Setting header text property for clientselectcolumn is not shown in grid. I want to show a text for the column.Please help.

    <telerik:GridClientSelectColumn UniqueName="Select" HeaderText="Select All">
                        </telerik:GridClientSelectColumn>
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 20 Apr 2012 Link to this post

    Hi Tina,

    You can add a label to the headeritem for the clientselectcolumn as shown in the code below.

    C#:
    protected void RadGrid2_ItemCreated(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridHeaderItem)
        {
            GridHeaderItem item = (GridHeaderItem)e.Item;
            Label lbl = new Label();
            lbl.ID = "Label1";
            lbl.Text = "Select All";
            item["Select"].Controls.Add(lbl);
        }
    }

    Thanks,
    Princy.
Back to Top