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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Print problems

Thread ID:

Created:

Updated:

Platform:

Replies:

146848 Aug 22,2019 02:27 PM UTC Aug 23,2019 10:42 AM UTC Angular - EJ 2 1
loading
Tags: Grid
Unknown
Asked On August 22, 2019 02:27 PM UTC

Hello,

I have problems with printing grid.

1. I am having different grids in my program. When I try to print first grid for the first time - I get data correctly. After that I am trying to print different grid I get data from WebAPI but in print dialog I see "No records to display" and header like previous grid:
First try to print:


Second try to print different grid:

But with this try in my Network tab I can see that data from WebAPI was get correctly:



2. I am getting data for my grid using WebAPI. I am getting  records and also count. How can I get this count number in my component?

Thavasianand Sankaranarayanan [Syncfusion]
Replied On August 23, 2019 10:42 AM UTC

Hi AC, 
 
Greetings from Syncfusion support. 
 
Query 1: Showing “No records to display” when we click for print Grid.  
 
We have prepared a sample with your mentioned scenario but unfortunately we are unable to reproduce the issue from our end. 
 
 
Please provide the following details for better assistance. 
 
  1. Share the complete Grid rendering code.
  2. If possible try to reproduce the issue in the attached sample.
  3. Whether the mentioned issue is reproducing when we click for print else if we do some other operations after clicking the print.  
  4. Do you have WebAPI adaptor in both Grid sample ?
 
Query 2: How can I get this count number in my component? 
 
We can get the total records count in Grid by using the pageSettings API in Grid. 
 
In the below code example we have get the total records count in an external button click event. 
 
[app.component.html] 
 
<button id="RecordCount" (click)="RecordCountClick()">Get total record count</button> 
 
----------------------------------------------------------------------------------------------------------------------- 
[app.component.ts] 
 
export class AppComponent { 
 
    . . . . 
     
    RecordCountClick(args) { 
        console.log(this.grid.pageSettings.totalRecordsCount) 
    } 
 
    . . . . 
 
} 
 
 
We have prepared  a simple sample in the following link. 
 
 
Regards, 
Thavasianand S. 


CONFIRMATION

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

Live Chat Icon For mobile
Live Chat Icon