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

[Solved] RadGrid header tooltips

3 Answers 151 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ryan Bandouveres
Top achievements
Rank 1
Ryan Bandouveres asked on 28 May 2009, 06:38 PM
In the RadGrid, when the option to allow column reordering is turned on, there is a tooltip that shows up when you hover over the columns which states "drag to group or reorder".  There is a setting in our db that tells the grid to turn grouping on or off at run-time.  When grouping is turned off, I would like the tooltip to read something such as "drag to reorder".  I've searched all over and tried several attempts at getting this to change, but so far I have not had any luck.  I also tried using a RadToolTip, but I still get the original one in addition to the RadToolTip.  Any help on this would be greatly appreciated.  Thank you.

I tried the following in RadGrid_ItemDataBound event with no avail.

        if (e.Item is GridHeaderItem)
        {
            GridHeaderItem header = e.Item as GridHeaderItem;
            header["colTranDate"].ToolTip = "header.tooltip test";
        }


3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 29 May 2009, 04:18 AM
Hello Ryan,

You can alter the DragtoGrouporReorder tooltip as shown below:
 <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" > 
       <ClientSettings AllowDragToGroup="true"
        <ClientMessages DragToGroupOrReorder="customToolTip" /> 
        
        </ClientSettings> 
       <MasterTableView> 
          .... 
       </MasterTableView> 
 </telerik:RadGrid> 

Thanks
Princy.
0
raghu
Top achievements
Rank 1
answered on 29 May 2009, 11:30 AM
Hi,
I have been trying to set custom tooltips for radgrid header columns. Used following code, but no luck. Any help ?

protected void gdObjects_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridHeaderItem)
{
GridHeaderItem header = (GridHeaderItem)e.Item;

header["select"].ToolTip = "test";

}
}
0
Ryan Bandouveres
Top achievements
Rank 1
answered on 29 May 2009, 01:39 PM
Thank you for the responses.  I figured it out late last night with the following line of code:

RadGrid.ClientSettings.ClientMessages.DragToGroupOrReorder =

"drag to reorder";

 

Tags
Grid
Asked by
Ryan Bandouveres
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
raghu
Top achievements
Rank 1
Ryan Bandouveres
Top achievements
Rank 1
Share this question
or