View Full Version : retreiving disabled nodes of tree

10 Oct 2010, 6:07 AM
How do i retreive the disabled nodes of a tree

10 Oct 2010, 10:35 PM
Call cascade() on the root node and collect all disabled nodes.

11 Oct 2010, 12:35 AM

Thanks the cascade function worked great. :)

Now i have a grid defined in the Ext.onReady() method.

Outside the onready() , i want to access this grid by :

but it gives error saying Ext.fly(grid.getView().getRow(row)). is null.

Where am i going wrong?
is it that the grid is not accessible outside onready method?
When i say Ext.getCmp('grid'), i get the grid component, i checked in firebug.
but somehow this ext.fly isnt working.
Aslo basically i just want to change color of row to red, is there any other way out?

thanks in advance in anticipation of help.

11 Oct 2010, 12:47 AM
1. Is row >=0 and <= store.getCount()?
2. Are the grid rows rendered (after the viewready event)?

11 Oct 2010, 12:52 AM
Yes the grid is already rendered with all values in it. This is a functionality that i am adding after grid is rendered just to make two rows highlighted with red colour.
The same code worked when all of my code was inside the onReady method.

11 Oct 2010, 12:55 AM
Ext.fly can't be the problem. I assume it's getRow that is returning false instead of a DOM node.

Are you ABSOLUTELY sure the row exists at the time you are executing this line?

11 Oct 2010, 1:00 AM
Yes the row does exist.
The grid is already rendered with all values.
Outside onready function, i call a function hightlightRows().
In this function, i retreive all rows which are supposed to be highliged, i even get the row.
now the code to hightlight teh row in red is
On execution of this line, it throws the error :
Ext.fly(grid.getView().getRow(row)) is undefined.

Is there any other way i can highlight the row. Beacuse i am getting the row, i can see that in firebug all values of row.

11 Oct 2010, 1:03 AM
By 'outside Ext.onReady' you mean?

When exactly is your code executed?

11 Oct 2010, 1:06 AM
Grid is rendered on screen. Then on click of import button, i open a child window to select a file. On click of OK button on this child window, this code gets executed of highlighting the row.

11 Oct 2010, 1:12 AM
So debug.

I'm pretty sure your 'row' is incorrect and that grid.getView().getRow(row) is returning false.

11 Oct 2010, 1:26 AM

Hey since you iterated, i checked my function again and checked all values in firebug, and yes, you are right. the row that i was getting had an error and hence the problem. Now it is resolved.
Actually yesterday everything worked well, but i made some changes in code today morning which caused this problem.
I am really sorry for taking your time and again thanks for your help. really grateful to you.
yesterday was sunday and since you were not there , i wasnt getting the quick help from anyone else, the way i get from you.
Thanks a lot to you.