- Home
- Forum
- ASP.NET Web Forms
- Custom Toolbar Item and printGrid possible?
Custom Toolbar Item and printGrid possible?
Hi,
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">
<CustomToolbarItem>
<ej:CustomToolbarItem TemplateID="#Refresh" />
</CustomToolbarItem>
</ToolbarSettings>
[...]
and in the scripts section there is:
[..]
<script id="Refresh" type="text/x-jsrender">
<a class="e-toolbaricons refresh" />
</script>
<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
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">
<CustomToolbarItem>
<ej:CustomToolbarItem TemplateID="#Refresh" />
</CustomToolbarItem>
</ToolbarSettings>
[...]
and in the scripts section there is:
[..]
<script id="Refresh" type="text/x-jsrender">
<a class="e-toolbaricons refresh" />
</script>
<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
SIGN IN To post a reply.
2 Replies
MZ
Michael Ziegler
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?
PK
Prasanna Kumar Viswanathan
Syncfusion Team
May 18, 2016 12:25 PM UTC
Hi Micheal,
Thanks for contacting Syncfusion support.
|
Queries |
Response | |
|
“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:
| |
|
“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.
|
Regards,
Prasanna Kumar N.S.V
SIGN IN To post a reply.
- 2 Replies
- 2 Participants
-
MZ Michael Ziegler
- May 17, 2016 10:24 AM UTC
- May 18, 2016 12:25 PM UTC