New to Kendo UI for jQuery? Download free 30-day trial

AutoSync Does Not Work in Grid When Using Server Grouping

Environment

Product Progress® Kendo UI® Grid for jQuery

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 Kendo UI Grid for ASP.NET MVC, set ServerOperations(false) in the DataSource configuration.

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();
        }
    }
In this article