2

Is there a good way of updating the values displayed in an ExtJS 4 PropertyGrid many times a second?

Calling setSource works, but it triggers a full re-render of the component, hammering the component layout and making things like scrollbars unresponsive.

Rob Agar
  • 12,337
  • 5
  • 48
  • 63
  • Change the HTML element directly and if required suspend any event that eventually get fired. You can test it with Observable. – sra Nov 20 '12 at 11:40
  • @sra That's pretty much it - I was wondering if there was "official" way. Is anything other than another call to setSource likely to overwrite direct changes? – Rob Agar Nov 20 '12 at 12:09
  • ... and you don't know if there's any way to make PropertyGrid set meaningful id's on the grid cell content divs by any chance? – Rob Agar Nov 20 '12 at 12:29
  • Well you should trigger a sort of node-ref-reload on any event that indicates a grid-refresh. See my answer, I think the last part will fit your needs – sra Nov 20 '12 at 12:32

1 Answers1

2

I must say I never used propertyGrids that much but in case o high frequent changes I would directly write to the dom and ensure (along with each writing or a trigger) that no events gets bubbled up to ExtJS.

Anyway, I am pretty sure that any change to the bound store will also affect the value. setSource is just a way to apply data that get also inserted into the store. But this will always change all and I guess override any existing data (the last I don't know for sure)

But you can also use setProperty to change a single property. May that one is enough. Worth a try.

sra
  • 23,820
  • 7
  • 55
  • 89