Completed
Last Updated: 20 Nov 2014 18:24 by ADMIN
Imported User
Created on: 17 Feb 2012 19:58
Category: Kendo UI for jQuery
Type: Feature Request
109
Add the ability to disable buttons
It would be nice if you could add a disabled state for k-button.  That way, we don't have to hide the buttons from the users to force them to enter some information before clicking a button.
6 comments
ADMIN
Telerik Admin
Posted on: 11 Apr 2014 13:44
I will forward your suggestion to the product team, looks quite reasonable.

By the way, is applying the k-state-disabled style to disabled buttons dynamically applicable for your scenarios? Here's some more info about the css styles used by the Kendo UI widgets:
 http://docs.kendoui.com/getting-started/web/appearance-styling

Update: Since this functionality produces the desired outcome for buttons and there are no objections, I am closing this entry.
Chris
Posted on: 24 Jun 2013 05:17
You can wrap the button nicely in your own.  I've done this very thing with images making a nice little api for image buttons:

    $.fn.p1pCommandButton = function (clickHandler) {
        var btn = {};
        var isEnabled = true;
        var self = this;

        btn.disable = function () {
            isEnabled = false;
            $(self).addClass('k-state-disabled');
        }

        btn.enable = function () {
            isEnabled = true;
            $(self).removeClass('k-state-disabled');
        }

        $(this).click(function () {
            if (isEnabled) {
                clickHandler();
            }
        });

        $(this).data('p1pCommandButton', btn);
        return btn;
    };
Hari
Posted on: 14 Sep 2012 04:37
Is it possible to delete a row in Kendo grid ? I hardly found any example :( 
Dan Cornish
Posted on: 01 May 2012 14:43
I second David's comment regarding all widgets.
ADMIN
Telerik Admin
Posted on: 03 Apr 2012 09:45
Meaningful suggestion, will take it into account for future versions.
David
Posted on: 30 Mar 2012 21:44
It would be nice if a disable() and enable() method were available to all widgets