Cursor Wait on RadButton Click

2 posts, 0 answers
  1. Glenn
    Glenn avatar
    47 posts
    Member since:
    Nov 2011

    Posted 18 Jun 2015 Link to this post

    Have Radbutton on page displayed in Radwindow with OnClientClicking function:

     

    function OnClientClicking(sender, args) {
                      document.getElementById('<%=form1.ClientID%>').style.cursor = 'wait';
                                }

    The RadButton submits postback, but their is sometimes a delay.

    The wait cursor displays when hovering on parts of the form that don't include controls (buttons, input controls)

    Is there anyway to have the wait cursor show over the Radbutton as well, or all the controls would be better.

    Thanks

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 22 Jun 2015 Link to this post

    Hello Glenn,

    Perhaps showing a RadAjaxLoadingPanel would be a more suitable solution, as it provides more consistent UI and will also consime any mouse clicks, while simply changing the cursor will not prevent clicks.

    Nevertheless, I would suggest using a CSS class and a heavy enough selector so it overrides all child elements' own cursor properties. For example:

    <telerik:RadButton ID="RadButton1" runat="server" Text="Postback" OnClientClicking="OnClientClicking" />
    <script>
        function OnClientClicking(sender, args) {
            document.getElementById('<%=form1.ClientID%>').className = "waitingForm";
        }
    </script>
    .waitingForm,
    .waitingForm *
    {
        cursor: wait !important;
    }


    Regards,

    Marin Bratanov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top