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

Header for Client Select Column

5 Answers 129 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Savyo
Top achievements
Rank 1
Savyo asked on 01 Jun 2012, 02:03 PM
Hello there,
     I want a header for my ClientSelectColumn. Can anybody help me with a code snippet to accomplish the above if possible.
Thanks in advance
Savyo

5 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 01 Jun 2012, 02:08 PM
Hello Savyo,

<telerik:RadGrid ID="RadGrid1" runat="server" AllowMultiRowSelection="true"


Thanks,
Jayesh Goyani
0
Savyo
Top achievements
Rank 1
answered on 01 Jun 2012, 03:47 PM
     Thanks Jayesh for your code. However what I actually required was a headertext for my ClientSelectColumn. Sorry for not specifying my requirement correctly. Anyway i would appreciate your support if you help me out with this. I have given the header ClientSelectColumn for multiple selection.
Savyo
0
Shinu
Top achievements
Rank 2
answered on 01 Jun 2012, 03:50 PM
Hi,

Please try the following code for giving HeaderText for ClientSelectColumn.

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,
Shinu.
0
DQ
Top achievements
Rank 1
answered on 16 Aug 2012, 06:19 PM
What is wrong with the HeaderText = "ZZZ" in the aspx/ascx?  It does not work?
0
Shinu
Top achievements
Rank 2
answered on 17 Aug 2012, 04:38 AM
Hi,

Giving HeaderText in ASPX works if the AllowMultiRowSelection is set to false. If its set to true then the HeaderText wont appear. The above code snippet is to give the header for ClientSelectColumn with multiple row selection.

Thanks,
Shinu.
Tags
Grid
Asked by
Savyo
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Savyo
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
DQ
Top achievements
Rank 1
Share this question
or