In a Grid with a hidden column, the aggregates in the footer shift to the right if you edit a cell.
Regression introduced with 2023.2.829
The footer cells shift to the right.
The footer cells shouldn't shift to the right after updating a cell.
Hi Bradley,
Here is some information why this happens and how to avoid it.
Why this happenschange: function (e) {
if (e.field && e.action == "itemchange") {
var grid = $("#grid").data("kendoGrid");
var aggregates = this.aggregates();
var newRow = $(grid.footerTemplate(aggregates));
var newCells = newRow.children("td");
var currentCells = grid.footer.find(".k-footer-template>td");
newCells.each(function (index) {
var currentCell = currentCells.eq(index);
if (currentCell.length) {
currentCell.html($(this).html());
}
});
}
}This computes the new aggregate markup the same way as before, but instead of swapping DOM nodes, it only updates the innerHTML of each existing cell so the hidden-column display state stays intact and the alignment issue disappears, even when columns are hidden/shown before or after an edit.
You can give the solution a try in the following dojo https://dojo.telerik.com/AIcoVSAL. Hiding a column and then editing a cell keeps the footer aggregates correctly aligned under their respective columns, with no shift.Regards,
Rumen
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.