Declined
Last Updated: 24 Sep 2025 13:55 by ADMIN
Karen
Created on: 17 Sep 2025 19:54
Category: Kendo UI for jQuery
Type: Bug Report
0
In a grid save event, when using model.set() for a column mapped to a complex object, the UI does not refresh

We have a column in our grid bound to a complex JSON object. When a different column's value is changed, we need to change the nested properties in the complex JSON object.

To do this, in the grid's Save event, we are calling model.set("theComplexObject.NestedProperty", newValue). However, doing this does not automatically update the UI for that row's cell. Furthermore, it never seems to mark the column dirty. Manually calling grid.refresh() will fix the issue, but the grid we are working on has a lot of columns and it adds a performance hit.

This approach works for all of our other columns that do NOT use complex objects. They correctly show the dirty flag and new model value after the save operation completes.

Below is a Dojo example with the save event wired up and a complex name column. It's worth mentioning that the dirty flag also doesn't appear to be working on the eye color column. This may be another bug introduced in a newer version of Kendo.

https://dojo.telerik.com/ZHkxwJee

  • Change the age for a column and click off the cell. The eyeColor updates, but the name does not. The dirty flag gets put in the first cell for some reason (this happens when updating the second row too... it adds the dirty flag to the first cell in the first row).
  • Enabling the currently commented line that does e.sender.refresh() will fix the display issues, but the dirty flag still doesn't show for the name column.
1 comment
ADMIN
Neli
Posted on: 24 Sep 2025 13:55

Hi Karen,

Generally speaking, the Grid is designed to display flat data. Nevertheless, the Kendo Grid supports column templates, detail templates, etc., which allow the user to display complex objects within the table. However, the DataSource supports flat data, which is why some scenarios, such as updating using the model.set, will not work with nested objects.

This is a limitation when binding grid columns to complex objects. The grid's change detection and dirty flag marking are primarily designed for primitive fields.

What you could try is either using the approach described in the KB linked below for displaying nested objects:

- https://www.telerik.com/kendo-jquery-ui/documentation/knowledge-base/use-nested-model-properties

Or you can try setting the model to an entire object:

save: function(e) {
            if (e.values.hasOwnProperty("age")) {
                e.model.set("name", {
                    first: "Jane Changed",
                    last: "Doe " + e.model.age
                });
                e.model.set("eyeColor", "purple");
            }
        }

Here you will find such a Dojo example - https://dojo.telerik.com/UrYlIVRz.

With the above said, I will mark the report as 'Declined'.

In case you have any additional questions or need further assistance in achieving the desired result, do not hesitate to contact us.

Regards,
Neli
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.