This is a migrated thread and some comments may be shown as answers.

Use custom .gif on Load

1 Answer 305 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joel
Top achievements
Rank 2
Bronze
Iron
Iron
Joel asked on 05 Oct 2020, 09:37 PM
How do I use my own .gif in the grid while it is loading?

1 Answer, 1 is accepted

Sort by
0
Georgi Denchev
Telerik team
answered on 08 Oct 2020, 12:20 PM

Hi, Joel

My colleague has given an answer to this question in this thread:

https://www.telerik.com/forums/kendo-grid-loader-icon-customization#Uhbt_JDeqUaW8qTibNSBDA

To save you some time you need to modify the styling class of the loader. The following snippet could be copy-pasted directly into the grid's View file.

<style>
    .k-loading-mask .k-loading-image {
      background-image: url('Url to your gif');
    }
  </style>

In the above link there is a runnable preview in Dojo in case you want to examine it yourself.

Let me know if you have any questions.

Best Regards,
Georgi Denchev
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

Grzesiek
Top achievements
Rank 2
Iron
commented on 29 Apr 2022, 01:20 PM | edited

@Georgi Denchev

I've tried code below:


<style>
    .k-loading-mask .k-loading-image 
     {
  	    background-image:url('./images/loader.gif');
     }
</style>

 

But it doesn't overwrite default image (repeat is not a problem, I can fix it).

 

Do you have any idea, why it happens?

Aleksandar
Telerik team
commented on 04 May 2022, 05:49 AM

You can add the following style to achieve the desired result:

<style>
      .k-loading-image:before,
      .k-loading-image:after{
        display: none !important;
      }
      .k-loading-image{
        background: url('./images/loader.gif')
          center center no-repeat;
      }
    </style>

Here is a dojo.

Grzesiek
Top achievements
Rank 2
Iron
commented on 06 May 2022, 04:28 PM

Thanks a lot, it works :)
Joel
Top achievements
Rank 2
Bronze
Iron
Iron
commented on 09 May 2022, 03:35 PM

This worked for me, also.  Thanks.

Tags
Grid
Asked by
Joel
Top achievements
Rank 2
Bronze
Iron
Iron
Answers by
Georgi Denchev
Telerik team
Share this question
or