Good Day,
I have a custom CSS CLASS that renders the background-color of the grids TABLE ROW to 'yellow'.
For example...the above CSS CLASS would 'color' the backgrounds of a TR's set of TD's.
<!-- Here is an example of the initial HTML containing the custom CSS CLASS -->
<tr data-uid="7044a8d8-2946-43f4-9f94-01bff52d2800" role="row" class="background-color-yellow">
<td role="gridcell">11</td>
<td role="gridcell">1111</td>
<td role="gridcell">111</td>
<td role="gridcell">111</td>
<td role="gridcell">111</td>
<td role="gridcell">111</td>
<td class="k-command-cell" role="gridcell">
<a role="button" class="k-button k-button-icontext k-grid-edit" href="#">
<span class="k-icon k-i-edit"></span>Edit
</a>
<a role="button" class="k-button k-button-icontext k-grid-delete" href="#">
<span class="k-icon k-i-close"></span>Delete
</a>
</td>
</tr>
THE ISSUE
When using inline-editing on the grid...pressing the CANCEL button wipes-out & replaces any-and-all custom CSS tags in the TR.
<!-- Here is an example of the initial HTML AFTER PRESSING CANCEL...notice the custom CSS CLASS is gone -->
<tr data-uid="7044a8d8-2946-43f4-9f94-01bff52d2800" role="row">
<td role="gridcell">11</td>
<td role="gridcell">1111</td>
<td role="gridcell">111</td>
<td role="gridcell">111</td>
<td role="gridcell">111</td>
<td role="gridcell">111</td>
<td class="k-command-cell" role="gridcell">
<a role="button" class="k-button k-button-icontext k-grid-edit" href="#">
<span class="k-icon k-i-edit"></span>Edit
</a>
<a role="button" class="k-button k-button-icontext k-grid-delete" href="#">
<span class="k-icon k-i-close"></span>Delete
</a>
</td>
</tr>
THE WORK AROUND
This bug causes the following kinds of work-around...which I feel is unacceptable.
this.on = { cancel: { grid: function (e) { var isTemplatedRow = e.model.IsTemplatedRow; if (isTemplatedRow === false) { // HACK: Kendo overwrites the (tr) rows ENTIRE SET of CSS CLASSES after a 'cancel' is triggered var uid = e.container.data().uid; var $context = $(e.container.context); setTimeout(function () { // Add the expected class back-in var $ele = $('tr[data-uid=' + uid + ']', $context) $ele.addClass('background-color-yellow'); }, 400); } } } };