3

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.

Fares Omrani
  • 255
  • 1
  • 4
  • 22
  • 1
    I would look into setting a custom class on ones that have `checked: true`, which has CSS that changes the color of the node. – forgivenson Jan 17 '14 at 17:43

1 Answers1

1

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";
    }
}
Akatum
  • 3,976
  • 2
  • 18
  • 25