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

Waitcursor/spinner for button

1 Answer 839 Views
Button
This is a migrated thread and some comments may be shown as answers.
Larry
Top achievements
Rank 2
Iron
Veteran
Iron
Larry asked on 19 Jan 2021, 08:16 PM

Is there some way to change a button to have an animated spinning gif after clicking it invokes either a data retrieval or does an update?  Something like this (with the boolean as a property in code-behind)?

<TelerikButton OnClick="@(args => NameOfFunction(param1, param2, param))">Retrieve
<template>
    @if(IsSaving == false)
    {
        //Leave button as is
         
    }
    else
    {
        //Put animated spinning gif
    }
</template>
</TelerikButton>
billy
Top achievements
Rank 2
Iron
Iron
Iron
commented on 23 Nov 2022, 10:46 PM

He's not wanting to show a loader on the screen "somewhere" but instead swap an icon within the button to be a loader while performing an action. I am needing to do something like this as well and the compile fails. This is baked in behavior in other frameworks like material and bootstrap. Is this not a possibility?
Dimo
Telerik team
commented on 25 Nov 2022, 02:05 PM

1 Answer, 1 is accepted

Sort by
1
Accepted
Svetoslav Dimitrov
Telerik team
answered on 20 Jan 2021, 07:37 AM

Hello Larry,

We have a Loader component that you can use to add a spinner or other type of loader to your Telerik Button. We have an example that shows how to achieve that in the Visible parameter section of the docs. 

Regards,
Svetoslav Dimitrov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Button
Asked by
Larry
Top achievements
Rank 2
Iron
Veteran
Iron
Answers by
Svetoslav Dimitrov
Telerik team
Share this question
or