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

RadGrid GridTemplateColumn sorting image tooltip

1 Answer 83 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
krishan kumar
Top achievements
Rank 1
krishan kumar asked on 10 May 2010, 03:10 PM
Hi,
i needs to be changed default RadGrid GridTemplateColumn sorting "ASC/DESC" image tooltip...

please help me.....

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 11 May 2010, 04:06 PM
Hello Krishan,

To achieve the desired functionality you could try the following approach:
On RadGrid.ItemDataBound event handler you could get the header item and find the ASC/DESC sorting button:
void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
     if (e.Item is GridHeaderItem)
     {
         GridHeaderItem item = (GridHeaderItem)e.Item;
         if (item["TemplateColumn"].Controls.Count > 1)
         {
             string clietnID = (item["TemplateColumn"].Controls[2] as Button).ClientID;
             ScriptManager.RegisterStartupScript(Page, Page.GetType(), "toottip", "changeTooltip('" +clietnID + "');", true);
          }
     }
 }

Then you could register startup script which changes the input's title attribute on the client:
<telerik:RadCodeBlock runat="server" ID="RadCodeBlock">
        <script type="text/javascript">
            function changeTooltip(id)
            {
                var img = document.getElementById(id);
                img.title = "Test";
            }
        </script>
 </telerik:RadCodeBlock>

Additionally I am sending you a simple example which demonstrates how to achieve the desired functionality.

Greetings,
Radoslav
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
krishan kumar
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or