This is a migrated thread and some comments may be shown as answers.
Get total of all columns on edit
1 Answer 2 Views
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 17 Sep 2017, 01:29 PM

I have a grid with 2 columns. Rep and commission. I need to ensure commission is never > 100%, so once it reaches 100% i want to disable the add button in the toolbar.

I know how to get aggregates, but how would i access this when the user edits?

1 Answer, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 19 Sep 2017, 08:19 AM
Hello Jason,

The desired result can be achieved on the save event. I can suggest checking if the aggregate value is equal or over 100 and prevent the saving:

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#events-save

I made an example demonstrating this:

http://dojo.telerik.com/oSumo

I hope this is helpful.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Jason
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or