Edit this page

AutoSync Does Not Work in Grid When Using Server Grouping

Environment

Product Progress Kendo UI Grid

Description

I have the autoSync option set to true in the Grid. If I enable server-side grouping and group the Grid by a column, the auto-sync functionality stops working.

Steps to Reproduce

  1. Create a Grid with the editable: true and groupable: true settings.
  2. In the DataSource of the Grid, set autoSync: true and serverGrouping: true.
  3. Group the Grid by columns.
  4. Try to change a cell value in the Grid.

The Grid does not sync the changed value with the server. The auto-sync starts working if you ungroup the Grid.

Cause

This behavior is a limitation in the Grid. The default "incell" editing mode combined with the autoSync: true DataSource setting is not supported when you use server-side grouping in the Grid.

Suggested Workarounds

You can either:

Disabling Server Operations

In the dataSource configuration of the Grid, set serverGrouping: false. For the MVC Grid, set ServerOperations(false) in the DataSource configuration.

Important

This approach might decrease client-side performance especially when the Grid handles large amounts of data.

Saving Values Manually

When the Grid is grouped, manually call the saveChanges() method of the Grid in the cellClose event. This approach guarantees that the changes which are made in the cell before it was closed will be sent to the server.

    function onCellClose(e) {
        var grid = e.sender;
        if (grid.dataSource.group().length > 0) {
            grid.saveChanges();
        }
    }
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy