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

Disabled button / Inverted Hover Behavior

1 Answer 85 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Chris Sears
Top achievements
Rank 1
Chris Sears asked on 21 Apr 2008, 08:43 PM
If you use client script to disable a button in a tool bar click event handler, the hover behavior becomes inverted. Try this:

function toolBarClicking(sender, args){
    args.get_item().disable();
}

Whatever button you clicked will now show a hover effect when you move off of it, even though the button is disabled.

1 Answer, 1 is accepted

Sort by
0
Erjan Gavalji
Telerik team
answered on 22 Apr 2008, 11:29 AM
Hi Chris,

Thank you for the report. We already fixed that and will be available in the first official service pack of RadControls for ASP.NET AJAX. In the meantime, you can overcome the problem using the following code:

    function onClientButtonClicking(sender, args)
    {
        args.get_item().get_element().className = args.get_item().get_element().className.replace(/rtbItemHovered /ig, "");
        args.get_item().blur();
        args.get_item().disable();

    }

Please, find your Telerik account updated.

Cheers,
Erjan Gavalji
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ToolBar
Asked by
Chris Sears
Top achievements
Rank 1
Answers by
Erjan Gavalji
Telerik team
Share this question
or