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

conditional Disable/Enable the Create button in toolbar

1 Answer 1638 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Congyuan
Top achievements
Rank 1
Congyuan asked on 19 Jul 2016, 08:59 PM

I cloned you example page here.

http://dojo.telerik.com/@cchu/ONOZi

Is there any why I can disable or enable that create button and those Edit and Delete ones by some condition?  Maybe a Boolean value defined somewhere in View Model. 

if that value changes it's able to refresh the status of those buttons. 

1 Answer, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 21 Jul 2016, 11:39 AM
Hi Congyuan,

You can check out the following how-to article from our documentation:

http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/Editing/show-edit-button-for-editable-records-only

I have modified it to better match the described scenario. You can edit an item, and set a value for Unit Price that matches the condition (UnitPrice % 5 === 0) to confirm that the disabled class will be applied for the corresponding row's buttons:

http://dojo.telerik.com/UQaGo

I hope this helps.

Regards,
Dimiter Topalov
Telerik by Progress
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Tags
Grid
Asked by
Congyuan
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Share this question
or