문제

I have a treepanel in Extjs4 with some of it's nodes are checked in the json code with "checked: true".

I want to change the color of only the checked nodes from black to another color.

I hope my question is clear and thank you for helping.

도움이 되었습니까?

해결책

You can use Ext.tree.View getRowClass method for setting your own css class for checked nodes.

In your treepanel config you can use something like this:

viewConfig: {
    getRowClass: function(record, rowIndex, rowParams, store){
        return record.get("checked") ? "row-checked" : "row-unchecked";
    }
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top