DOJO DGRID Collection Sync With INPUTS

102 views Asked by At

I have a dgrid with inputs. My dgrid is in edit mode so users can add rows, edit rows and sort rows. When I look at my collection, it looks like

id: "1"

COLUMN1: "INPUT TYPE="text"...."

COLUMN2: "INPUT TYPE="text"...."

Note: I could not put the greater than and less than above with describing the inputs.

and so on. When I make a change on screen, for one of the inputs, the collection is not updated. So, when I enter a new row or sort the dgrid, all the entered data refreshes back to its original state. I know the reason is because the collection is not updated. Is it possible to update the collection or do I have to write my own code to do so? Please note, I am using a dgrid and NOT an onDemand grid.

Thanks for your help in advance.

1

There are 1 answers

0
Himanshu On

Please add some code on how you are initializing your collection and what all mixins are being used for it. As far as I can understand your problem, you need to add the Trackable mixin in your collection. Read its documentation here.

From the documentation:

We can add support for tracking the position of updates by using the Trackable mixin. With the Trackable mixin added to a store, we can call the store's track method to get a collection that includes index information in its delete, add, and update events.

This might be of your help.