grid no record template or loading template

0 Answers 17 Views
Grid
horváth
Top achievements
Rank 2
Iron
Iron
horváth asked on 22 May 2024, 06:08 PM

Hi,

if the grid is loading the data, I would like to show the loading template, and if filtering the data, and there is no data, then the no record template. The issue is, that it seems, that if I set up the loading template, also the no record template is showing while loading.

How to avoid that?

horváth
Top achievements
Rank 2
Iron
Iron
commented on 22 May 2024, 06:31 PM

I found a solution.


@if (loading) {
    <ng-template kendoGridLoadingTemplate>
      <div>loading template</div> </ng-template
    >} @else {
    <ng-template kendoGridNoRecordsTemplate>
      <no-data-found></no-data-found> </ng-template
    >}

And I set the color of the default text for no data transparent:


.k-grid-norecords .k-table-td {
  color: transparent;
}

No answers yet. Maybe you can help?

Tags
Grid
Asked by
horváth
Top achievements
Rank 2
Iron
Iron
Share this question
or