I am creating a custom button by using "navButtonAdd". I want to enable/disable this button. How do I do this?
grid.navButtonAdd("#pg_List1_toppager", { caption: "", buttonicon: "icon-archive", onClickButton: customSearch, position: "first", title: "Archive", cursor: "pointer", disabled: "disabled" });
First of all I would recommend you to use id option of navButtonAdd which allows assign id attribute to the button. It makes easier to address the button later. To disable the button you can add class "ui-state-disabled" to it. To enable the button you can remove buttons.
I would recommend you to examine the demo from the answer and another demo from the answer which hide/show non-active buttons of navigator bar.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With