Tooltip in export buttons

6 posts, 0 answers
  1. MBEN
    MBEN avatar
    203 posts
    Member since:
    Nov 2011

    Posted 05 May 2014 Link to this post


    I am using exportbuttons in the commanditemsetting to handle exports in my grid. I need to show a tooltip on thehover of export images but I am unable to do so as shown in this example

    Below is my grid declaration:

    <telerik:RadGrid ID="rgBalances" runat="server" DataSourceID="_dataSrcBalances" EnableViewState="false"                         OnPreRender="rgBalances_PreRender" OnItemCommand="rgBalances_ItemCommand"                        OnItemDataBound="rgBalances_ItemDataBound" OnItemCreated="rgBalances_ItemCreated">
           <MasterTableView TableLayout="Fixed" HierarchyDefaultExpanded="true" CommandItemDisplay="Top"
            DataSourceID="_dataSrcBalances" Name="AccountBalance" EnableNoRecordsTemplate="true"
                  <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false"     ShowExportToExcelButton="true"   ShowExportToPdfButton="true" ShowExportToWordButton="true" ShowExportToCsvButton="true" />
                            <ExportSettings ExportOnlyData="true" IgnorePaging="true" FileName="Activity" OpenInNewWindow="true">
                                <Pdf PaperSize="A4" PageLeftMargin="5px" PageRightMargin="5px" PageWidth="297mm"
                                    PageHeight="210mm" />
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 06 May 2014 in reply to MBEN Link to this post


    You can set the tooltip for export buttons using its Text property. Please try the following code snippet.

    <CommandItemSettings ShowExportToExcelButton="true" ExportToExcelText="Your Text" />

  3. MBEN
    MBEN avatar
    203 posts
    Member since:
    Nov 2011

    Posted 06 May 2014 in reply to Princy Link to this post

    When I use that I don't get a tooltip. Just the text is displayed next to the button.
  4. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 06 May 2014 in reply to MBEN Link to this post

    Hi MBEN,

    Please try setting it from code behind as follows:

    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
      if (e.Item is GridCommandItem)
       GridCommandItem cmdItem = (GridCommandItem)e.Item;
       Button imbExcel = (Button)cmdItem.FindControl("ExportToExcelButton");
       imbExcel.ToolTip = "Excel ToolTip";
       Button imbPdf = (Button)cmdItem.FindControl("ExportToPdfButton");
       imbPdf.ToolTip = "PDF ToolTip";
       Button imbWord = (Button)cmdItem.FindControl("ExportToWordButton");
       imbWord.ToolTip = "Word ToolTip";
       Button imbCsv = (Button)cmdItem.FindControl("ExportToCsvButton");
       imbCsv.ToolTip = "CSV ToolTip";

  5. Kalai
    Kalai avatar
    6 posts
    Member since:
    May 2019

    Posted 30 Sep in reply to Princy Link to this post

    Hi Princy,

    I tried the below line to set tooltip on Excel icon. But its not showing tooltip. Please provide me the solution.

    <CommandItemSettings ShowExportToExcelButton=""  ExportToExcelImageUrl="../MyUrl/img.png" ExportToExcelText="Tooltip Text"/>

  6. Rumen
    Rumen avatar
    14100 posts

    Posted 02 Oct Link to this post

    I tested the solution and can confirm that it works as expected:

    	<telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" AllowPaging="true"
    			PageSize="7" AutoGenerateColumns="false" OnExcelMLWorkBookCreated="RadGrid1_ExcelMLWorkBookCreated"
    			OnItemCreated="RadGrid1_ItemCreated" OnHTMLExporting="RadGrid1_HtmlExporting" OnItemCommand="RadGrid1_ItemCommand"
    			<MasterTableView CommandItemDisplay="Top">
                    <CommandItemSettings ShowExportToExcelButton="true" ExportToExcelText="Tooltip text" ShowAddNewRecordButton="false" ShowRefreshButton="false" />
    				<Columns> ...

    For your convenience I have attached a video demonstration.

    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top