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.
- Share the complete Grid rendering code.
- If possible try to reproduce the issue in the attached sample.
- Whether the mentioned issue is reproducing when we click for print else if we do some other operations after clicking the print.
- 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.