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

Problem changing Grid Header tooltip

2 Answers 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 02 Jul 2010, 05:47 PM
I'm trying to change the RadGrid column header tooltip with the following code snipet:

 

protected void grdDetail_PreRender(object sender, EventArgs e)

 

{

 

GridHeaderItem header = (GridHeaderItem)grdDetail.MasterTableView.GetItems(GridItemType.Header)[0];

 

header[

"CatHMO"].ToolTip = "Custom Tooltip";

 

}


When I hover over the column header it still says "Click here to sort". What am I doing wrong.

Thanks

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 05 Jul 2010, 06:38 AM
Hello Richard,

Modify your code as shown below.


C#:
 
    protected void RadGrid1_PreRender(object sender, EventArgs e) 
    { 
        GridHeaderItem header = (GridHeaderItem)RadGrid1.MasterTableView.GetItems(GridItemType.Header)[0]; 
        (header["CatHMO"].Controls[0] as LinkButton).ToolTip = "Custom Tooltip";  
    } 



-Shinu.
0
Richard
Top achievements
Rank 1
answered on 06 Jul 2010, 02:39 PM
Thanks for the help. That solved the problem.
Tags
Grid
Asked by
Richard
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Richard
Top achievements
Rank 1
Share this question
or