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

HeaderTooltip vs AllowColumnsReorder

3 Answers 70 Views
Grid
This is a migrated thread and some comments may be shown as answers.
kiwo
Top achievements
Rank 1
kiwo asked on 11 Jun 2009, 01:46 PM
Hello.

I want to use HeaderTooltip property of Grid's column to display the detailed description of column. It works fine, until I set ClientSettings.AllowColumnsReorder to True. Then, I get "Drag to group or reorder" instead of my own tooltip. I do not want any reorder message to be displayed, how do I remove it? If I set it to empty string, my tooltip still does not appear.

Same thing about "Click here to sort", I do not want it neigther.

Thanks!

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 12 Jun 2009, 06:24 AM
Hi Kiwo,

You can remove the SortToolTip as shown below.

ASPX:
  
<SortingSettings SortToolTip="" /> 

Also give a try with the following approach to set the tooltip for the column header on the client side and see if it helps.

CS:
 
 protected void RadGrid1_PreRender(object sender, EventArgs e) 
    { 
        foreach (GridColumn col in RadGrid1.MasterTableView.RenderColumns) 
        { 
            if (col.ColumnType == "GridBoundColumn"
            { 
                foreach (GridHeaderItem header in RadGrid1.MasterTableView.GetItems(GridItemType.Header)) 
                { 
                    header[col.UniqueName].Attributes.Add("onMouseOver"" return Show('"+ col.HeaderTooltip +"','"+col.UniqueName+"');"); 
                } 
            } 
        } 
     
    } 

JS:
 
<script type="text/javascript" > 
 
function Show(tooltip,name) 
 { 
 var Grid =$find('<%=RadGrid1.ClientID %>'
 
  var col=Grid.get_masterTableView().getColumnByUniqueName(name); 
  col._element.title=tooltip; 
  alert(col._element.title) 
 } 
</script> 


Shinu.
0
kiwo
Top achievements
Rank 1
answered on 26 Jul 2009, 05:37 PM
Hi Shinu.

Thanks for your answer and sorry for long reply.

I still can't make it work. Trying to use your code, I can see that Attributes.Add() is successfully called on PreRender, but onmouseover attribute never appears in resulting HTML. Can you submit a working sample of this workaround?

Why isn't it possible to remove Column Reorder tooltip as easy as Sort Tool Tip?
0
Accepted
Sebastian
Telerik team
answered on 29 Jul 2009, 01:24 PM
Hello kiwo,

This issue has been resolved in version 2009.1.527 (Q1 2009 SP2) of RadControls for ASP.NET AJAX. The fix is included in the release notes here:

http://www.telerik.com/products/aspnet-ajax/whats-new/release-history/q1-2009-sp2-version-2009-1-527.aspx

Fixed: RadGrid sort messages should not be applied if HeaderToolTip is set.

Consider migrating to this version of the control following the steps from this KB article to see whether this helps.

Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
kiwo
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
kiwo
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or