PDA

View Full Version : How to use the same instance for the tree node and row data in grid?



cwtuan
18 Jul 2012, 4:16 AM
In my application, there is a tree and a grid showing the people's weight.
For example, the tree have 2 people
------
|--- Alice
|--- Bob

The grid shows the detail properties for people.
|-------------------------|
| Alice | 50KG |
| Bob | 60KG |
|-------------------------|

When I change the Alice's name on the tree, how do I change the Alice's name on the grid?
Now, I use the event to notify the grid to reload the data.

I wonder if I can use the same instance for the tree node and row data in grid.
If it's possible, when I change Alice's name on the tree, the data in grid will be updated automatically.

scottmartin
18 Jul 2012, 9:06 PM
If you change the value in the store, the grid will display the changes automatically.


store.getAt(1).set({'name': 'Sencha'}); // update record


Scott.