PDA

View Full Version : Forcing cells rendering



norbotek
1 Sep 2010, 1:18 PM
Hi

I am developing a spreadsheed like grid, and working on the formulas; I am using EditorGridPanel, everything is working pretty well, but I just have an issue, since I'm evaluating the formulas in render event of each cell, if I update any cell, how can I force cell rendering for all the cells in the grid so their values can be recalculated?, I found the render is fired only for those cells in the same Record.

Animal
1 Sep 2010, 1:40 PM
http://dev.sencha.com/deploy/dev/docs/?class=Ext.grid.GridView&member=refresh

norbotek
1 Sep 2010, 3:00 PM
Thanks for the response animal, nevertheless, I couldn't call this method from my component.

What I'm doing is extending EditorGridPanel, since refresh() method is in GridView, I don't know how can call this method.

My code is like this:

NTSpreadSheet = Ext.extend(Ext.grid.EditorGridPanel, {
...
...
_recalculateCells: function()
{
NTSpreadSheet.superclass.refresh.call(this); <----- NTSpreadSheet.superclass.refresh is undefined

I guess this is because EditorGridPanel does not have this function, neither GridPanel.

So, how can I call refresh method from my EditorGridPanel extended class?

norbotek
1 Sep 2010, 3:23 PM
ha!, sorry, I found it!, yes, using this.getView().refresh()

Thanks! :)