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

Editable grid - incorporate aggregates into validation

1 Answer 85 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mat
Top achievements
Rank 1
Mat asked on 30 Apr 2012, 01:50 PM
Hi. Before I spend days trying to figure this out, can somebody point me in the right direction?

Is it possible to perform validation on a grid (bound to remote data) that takes aggregate values into account?

For example, I have a grid that with columns for Monday through Sunday.  Each row can have a value for each day and there are aggregates for each day.

When adding a new row, I don't want the total for any day to exceed a set figure.

Is this possible, and if so, where do I start?

Thanks in advance.
 

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 03 May 2012, 10:04 AM
Hi Mat,

This functionality is not supported out of the box, but it is possible to override the default validation function or define a custom one.

I recommend you to check the following forum threads as they discuss how to:

The validation rules are part of the dataSource schema and you could access the corresponding aggregates through the dataSource API. For example:
$("#grid").data("kendoGrid").dataSource.aggregates()


Greetings,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Mat
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or