Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 99250

How to get different column values of a row in grid in custom validator while doing inline editing?

$
0
0
I am writing this below. I am able to get the StartDate field value in my case, but I am not able to get EndDate field value. It is coming as undefined. Please help.

model: {
                 id: "BusinessAreaDivisionMappingId",
                 fields: {
                     BusinessAreaDivisionMappingId: { type: "number", editable:false,     nullable: false},
                     StartDate: {
                         type: "date",
                         required: true,
                         validation: {
                             required: true,
                             dateComparisonValidation: function(element) {
                                 debugger;
                                 varcolumnIndex = 0;
                                 vargrid = $("#bAPLMappingGrid").data("kendoGrid");
 
                                 for(columnIndex; columnIndex < grid.columns.length; columnIndex++) {
                                     if(grid.columns[columnIndex].field == "EndDate") {
                                         break;
                                     }
                                 }
                                 varStartDate = newDate($(element).data("kendoDatePicker").value());
                                 varEndDate = newDate($(element).closest("tr").find("td:eq("+ columnIndex + ")").text());
                                 element.attr("data-dateComparisonValidation-msg", "Start Date Cannot be more than End Date");
                                 if(StartDate && EndDate)
                                     return(StartDate >= EndDate);
                                 returntrue;
                             }
                         }
                     },
                     EndDate: { type: "date"},
                     IsDeleted: { type: "boolean", editable: false, nullable: true}
                 }
             }

Viewing all articles
Browse latest Browse all 99250

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>