[Bug] Editing a cell and clicking inside the grid does not track data change

Posted by: nuno1 on 14 September 2017, 11:51 am EST

    • Post Options:
    • Link

    Posted 14 September 2017, 11:51 am EST

    kapture

    Notice that:

    1. I’ve changed “John” to “Bob”, clicked outside the cell but also outside the grid. The data change was tracked (expected).
    2. I’ve changed “Mary” to “Ana”, clicked outside the cell but inside the grid. The data change was not tracked (unexpected).

    Demo project in attachment (run ‘npm install && ng serve’).

    Please fix.

    2016/12/kapture.gif

    2016/12/demo-1.zip

  • Posted 14 September 2017, 11:51 am EST

    Hello,

    Thank you for reporting the issue, the reported behavior occurs because edited row remains in edit mode while the edited cell has exited from the edit mode.

    We have escalated this issue to the development team for further investigation with tracking id 229996. We will notify you as soon as we get any updates.

    As a workaround, changes can be tracked by committing changes on click outside cells and inside FlexGrid using following code snippet:

    HTML:

    <wj-flex-grid #grid [itemsSource]="data" style="height: 200px"></wj-flex-grid>


    TS:

    import { Component,ViewChild,AfterViewInit } from '@angular/core';
    export class AppComponent implements AfterViewInit {
        data = new wjcCore.CollectionView([
            { name: 'John', age: 25, birthday: new Date(1991, 5, 15) },
            { name: 'Mary', age: 30, birthday: new Date(1986, 5, 15) },
            { name: 'Peter', age: 35, birthday: new Date(1981, 5, 15) }
        ], { trackChanges: true });
        @ViewChild('grid') grid: wjcGrid.FlexGrid;
        ngAfterViewInit() {
            this.grid.hostElement.addEventListener('click', (e) => {
                var ht = this.grid.hitTest(e.pageX, e.pageY);
                if (wjcGrid.CellType[ht.cellType] == 'None') {
                    this.data.commitEdit();
                    
                }
            });
        }
    }

    Hope it helps.

    Thanks,

    Manish Kumar Gupta

  • Posted 14 September 2017, 11:51 am EST

    Thanks a lot Manish. I’ll use your workaround until you guys fix this.

    Kind regards.

  • Posted 26 January 2018, 12:48 am EST

    Hi Surya,

    We are sorry for the late reply.

    This issue has been fixed with build 5.20163.259+. Please have a look on this.

    ~Manish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels