however i want my added row have a custom class, so I can style my new added row with different background color. How can I achieve this ? am applying below code but its not applying new class to inserted row. when i click Add Row button A new row will inserted inside of Grid. i want to display color to that whole new row .
here i tried 2 ways but none of the below working. the new class is not adding to the inserted row.
if (e.action == "add") {
var uid = e.items[0].uid;
let dataGrid = $('#Grid').data('kendoGrid');
let dataView = dataGrid.dataSource.view();
for (let i = 0; i < dataView.length; i++) {
if (dataView[i].id === 0) {
dataGrid.table.find("tr[data-uid='" + dataView[i].uid + "']").addClass("red");
}
}
or
$("[data-uid='" + uid + "']").addClass('red');
}
.k-alt.k-master-row.red, .k-master-row.red {
background-color: red
}