PDA

View Full Version : Losing Added CSS Class on tree Node on expand and collapse.



jamil.isayyed
16 Apr 2013, 10:18 PM
Hi

i am facing a problem with tree Node in expanding and collapsing, in my code i am adding a CSS class for the tree node based on the data. Not all the tree Node contains this class. -the CSS class is intended to change the Text color of the node(if a condition exist make text color red for instance)- i am adding the class like this:

me.viewsRefrences.tree.getView().addRowCls(treeNode, "available");

this is works perfectly until i try to collapse or expand the tree node. so is this a known Bug?
how i can fix this problem.

Thanks in advance.

slemmon
16 Apr 2013, 10:45 PM
I'm not seeing that as a known bug in the tracker.
Can you tell me what version of ExtJS you're seeing the issue in?

evant
16 Apr 2013, 11:03 PM
This isn't a bug. Several things can cause a row/cell to re-render, addCls/removeCls are only temporary until that happens.

If you want a "permanent" class, use getRowClass for a row, or a renderer for a cell.

Moving to help.

jamil.isayyed
16 Apr 2013, 11:11 PM
I am using EXTJS 4.1