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

radbutton in toolbar, not able to disable

1 Answer 51 Views
Button
This is a migrated thread and some comments may be shown as answers.
Stacy
Top achievements
Rank 1
Stacy asked on 10 Sep 2019, 11:42 AM

I have an asp panel, that contains a toolbar and that toolbar contains a radbutton.

When the page loads, all is good.  I call a toolbar init on the client and an "onGridcreated" and I check if a row is selected in the grid.  If not, disable the button.  That works as expected.

After I select a row, a rowclick event fires, the button is enabled.  That works as expected.

If I click the button, which opens a radwindow, and do some editing to the data and save it and close my window, the ajax refreshes my main page.  During this, the toolbar init and onGridCreated are called.  It checks to see if a row is selected, there's not.  The code finds my button and calls set_enabled(false).

The button is then greyed out but I can still click it and it pops open a window.  Im expecting it to not be clickable.  Why would it fire events if it's not enabled?

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 13 Sep 2019, 06:07 AM
Hi Stacy,

To disable the button try setting a small time out

setTimeout(function() {
  btn.set_enabled(false);
200);

What happens if you replace the RadButton with a regular ASP.NET Button <asp:Button> and disable it with jQuery/JavaScript? Does the problem with the disabling still persist?


Best Regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Button
Asked by
Stacy
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or