We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Custom Toolbar Item and printGrid possible?

Thread ID:





124102 May 17,2016 10:24 AM UTC May 18,2016 12:25 PM UTC ASP.NET Web Forms 2
Tags: Grid
Michael Ziegler
Asked On May 17, 2016 10:24 AM UTC


I am running an asp.net website with a grid with an custom toolbar item which calls an javascript in the scriptcontent section for refreshing the grid. When I add the Toolbar item "printGrid", it just makes the same action as the Refresh button. Is there any chance to get this running?

This is a part of the

<ej:Grid ID="Test" runat="server" AllowSelection="True" AllowPaging="True" AllowSorting="True" AllowScrolling="True" AllowFiltering="True" AllowResizeToFit="True">
            <ClientSideEvents ToolbarClick="onToolBarClick" />
            <ToolbarSettings ShowToolbar="True" ToolbarItems="printGrid">


                    <ej:CustomToolbarItem TemplateID="#Refresh" />




and in the scripts section there is:

 <script id="Refresh" type="text/x-jsrender">
        <a class="e-toolbaricons refresh" />

    <script type="text/javascript">

        function onToolBarClick(sender, args) {

....following some code....


So is there any chance to get this printgrid running?

Thank you very much for your help!


Michael Ziegler
Replied On May 17, 2016 10:25 AM UTC

And another question would be about the size of printGrid function? With standard, it cuts the table... so is it possible to get the full table and resize it within the printer driver?

Prasanna Kumar Viswanathan [Syncfusion]
Replied On May 18, 2016 12:25 PM UTC

Hi Micheal, 

Thanks for contacting Syncfusion support. 


it just makes the same action as the Refresh button” 

To differentiate between print and refresh toolbar icon, we suggest you to check the condition in the toolbarClick event. In this event we were able to get the itemName in the arguments and refresh the grid.   

Please find the code example: 

function onToolBarClick(sender) { 
            if(sender.itemName == "Refresh") 

“is it possible to get the full table and resize it within the printer driver? 

We were able to reproduce the mentioned issue when we enable the allowScrolling in the sample. So, a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.    

Prasanna Kumar N.S.V 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon