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

Title for GridClientSelectColumn

2 Answers 38 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ewen
Top achievements
Rank 1
Ewen asked on 11 Apr 2010, 09:49 PM
Is it possible to add a title after the check-box in the header of a GridClientSelectColumn?

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 12 Apr 2010, 05:31 AM
Hello Ewen,

If you are using single row selection, then you can set the title by using HeaderText property of GridClientSelectColumn. In the case of you have enabled MultiRowSelection, then you can try the following code in ItemDataBound event.

C#:

protected
 void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) 
    { 
        if (e.Item is GridHeaderItem) 
        { 
            GridHeaderItem item = (GridHeaderItem)e.Item; 
            CheckBox select = (CheckBox)item["GridClientSelectColumn1"].Controls[0]; 
            select.Text = "My Title"
        } 

Regards,
Shinu
0
Ewen
Top achievements
Rank 1
answered on 12 Apr 2010, 10:14 AM
Shinu,

Many thanks worked a treat. I also had to override the style '.RadForm_Web20.rfdLabel label' to get the label colour to match the colour of the other (standard) columns.

Ewen.
Tags
Grid
Asked by
Ewen
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Ewen
Top achievements
Rank 1
Share this question
or