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

How to pass validation info to row detail template?

2 Answers 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 26 Feb 2014, 02:22 PM
I have grid validations that I catch/build in the Error event ... how can I pass my validation from the Error event to a detail row? I expand the detail row automatically when an error occurs.

2 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 28 Feb 2014, 04:05 PM
Hello,

Could you clarify what you mean by:
 pass my validation from the Error event to a detail row
If you wish to get the errors in the detailExpand or detailInit events then you could assign the errors to the grid or to the item in edit mode e.g.
function error(e) {
    if (e.errors) {
        $("#grid").data("kendoGrid").editable.options.model.errors = e.errors;
    }
}
 
function detailExpand(e) {
    var item = this.dataItem(e.masterRow),
       errors = item.errors;
}
 
function detailInit(e) {
    var item = e.data,
       errors = item.errors;
}


Regards,
Daniel
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jason
Top achievements
Rank 1
answered on 03 Mar 2014, 01:22 PM
That is precisely what I was looking for. Thank you very much.
Tags
Grid
Asked by
Jason
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Jason
Top achievements
Rank 1
Share this question
or