What is correct way to loop through Kendo Grid Column Values in JavaScript and perform an if statement on the values:
var dataSource = $("#grid").data("kendoGrid").dataSource;
// Gets the full set of data from the data source
var allData = dataSource.data();
dataSource.fetch();
var datasourcedata = dataSource.data();
var dataitem = datasourcedata[i].(columnName);
for (var i = 0; i < dataitem.value; i++) {
if (dataitem.value == 0) {
alert("error message");
e.preventDefault();
return false;
}
}
});
$.each(kendoDataSource.schema.model.fields, function (propertyName, propertyValue) {
alert(filter.field);
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.