PDA

View Full Version : Dynamically updating table cell content



Ronn
24 Jun 2008, 9:26 PM
Hi there,

Has anyone tried to dynamically update table item ?

i.e., I have a table which displays 5 rows of data. What I want to do is to update the store directly and have the binder trigger an update to the UI reflect this.

I've tried to update the store with no avail.


store.update(model); // where model is an existing object from store which has been modified.


The code looks like it should work, is this a bug?

darrellmeyer
25 Jun 2008, 7:10 AM
The code should work. If you post your code in this format (http://extjs.com/forum/showthread.php?t=33778) I will take a look.

Ronn
25 Jun 2008, 4:43 PM
Thanks Darrell, this now works beautifully!

As it turns out the object that I was passing into store.update was a clone and not an identical copy of the object in the store.

darrellmeyer
25 Jun 2008, 6:56 PM
Great. Also, if you are using Model instances (support for change events), you can call store.setMonitorChanges(true) and then changes to you model instances will be detected automatically, without having to call update() on the store.