How to change tooltip for a button on commandbar

Posted by: gongheh on 8 September 2017, 1:14 pm EST

  • Posted 8 September 2017, 1:14 pm EST

    I need to change tooltips to show my local language, how to do it?
  • Replied 8 September 2017, 1:14 pm EST

    in c#

  • Replied 8 September 2017, 1:14 pm EST

    Hello,


    The TextTipFetch event will fire when the tooltip is to show. You can set the e.TextTipp property to the text you want to display in the tooltip.

  • Replied 8 September 2017, 1:14 pm EST

    You mention the CommandBar in your post.  If you are using the WebForms version then Scott's code will not work.  For it you can do the following...

    <ol>

    <span class="keyword">protected</span> <span class="keyword">override</span>
    <span class="keyword">void</span> Render(<span class="keyword">System.Web.UI.HtmlTextWriter</span>
    writer)

    {

       

        <span class="keyword">WebControl</span> btn =
    FpSpread1.FindControl("Update");

       

        <span class="keyword">if</span> ((btn != <span class="keyword">null</span>))
    {

           

            btn.Attributes.Remove("title");

           

            btn.Attributes.Add("title", "Save");

           

        }

       

        <span class="keyword">base</span>.Render(writer);

       

    }

    </ol>
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels