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

Trying to add Header Text to ClientSelectColumn

1 Answer 18 Views
Grid
This is a migrated thread and some comments may be shown as answers.
vzzak
Top achievements
Rank 1
vzzak asked on 24 Nov 2008, 07:24 PM
Our users would like to see a label  or tooltip added to

ClientSelectColumn 
I have set the Header Text and Text properties but I am not seeing anything displayed. 

Is there a way to do this?  I would like to label the header check box and maybe the item boxes also.

Thank you,

Damon

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 25 Nov 2008, 05:31 AM
Hello,

If you try setting the headertext of the GridClientSelectColumn for the grid when AllowMultiRowSelection is set to true then the headertext would be replaced by the checkbox. To work around you can add a label to the headeritem for the clientselectcolumn as shown in the code below.
cs:
if (e.Item is GridHeaderItem) 
            { 
                GridHeaderItem header = (GridHeaderItem)e.Item; 
                // adding a label to the header item 
                Label lbl = new Label(); 
                lbl.Text = "Select"
                header["SelectCol1"].Controls.Add(lbl); 
                //or setting tooltip to the header item 
                header.ToolTip = "Select"
            } 

Thanks
Princy.
Tags
Grid
Asked by
vzzak
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or