WjInputDate in wijmo grid. collection view track changes not working

Posted by: shihalv on 14 September 2017, 11:54 am EST

  • Posted 14 September 2017, 11:54 am EST

    I have a wijmogrid, with a wjinputdate

                <wj-flex-grid-column name="EffectiveDate" header="Effective Date" binding="somedate" width="150" data-type="Date" is-required="false">
                    <wj-flex-grid-cell-template cell-type="CellEdit">
                        <wj-input-date is-required="false" format="dd MMM yyyy" value="$value"></wj-input-date>
                    </wj-flex-grid-cell-template>
                </wj-flex-grid-column>
    

    problem i have is. the collection view track changes is not working propertly. as the itemsEdited is always 1. even though i modified a bunch of rows’s date.

  • Posted 14 September 2017, 11:54 am EST

    i found the problem.

    When you are binding the column to a 2nd level property it will not work

    example. model.SomeObject.SomeProperty

    but binding to a first level property works.

    example. model.SomeProperty

  • Posted 14 September 2017, 11:54 am EST

    Hi Shihalv,

    We are looking into this.

    Thanks,

    Manish Kumar Gupta

  • Posted 14 September 2017, 11:54 am EST

    Hi Shihalv,

    The behaviour is by design.The CollectionView only tracks ‘shallow’ changes to item. That means changes would not be tracked made in nested level object (e.g. cutomer.name.first=‘Joe’).

    You can add code to detect this type of situation if you want.

    Please refer to the attached sample that implements the same.

    Thanks ,

    Manish Kumar Gupta

    2017/02/CutomEditor_collectionView.zip

  • Posted 9 October 2020, 12:48 pm EST

    Does this trackChanges work with older version of wijmo library? Also, does this work with populating itemsSource after the grid is setup? We have tried on our code and could not make it work.

  • Posted 12 October 2020, 12:11 am EST

    Hi Jenny,

    Can you let us know which version are you using?

    Also, does this work with populating itemsSource after the grid is setup

    If you will update the itemsSource, then a new CollectionView’ instance is created for the FlexGrid. So, you will need to enable the trackChanges property of the new CollectionView in order for it to work.

    Regards,

    Ashwin

Need extra support?

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

Learn More

Forum Channels