1

I have come a long way styling a certain treegrid, attempting to make it not look like a treegrid :D I've removed the connector lines, open/close buttons, icons to only have text and indentation.

However, for some reason when I hover a row, the background still changes to an shade, just like on any regular listgrid when you go over a row. It looks like it's a layer coming over my usual row. Any ideas how to disable this behaviour alltogether and only rely on CSS?

Then, a second issue: how can I create a margin between the rows/nodes in my TreeGrid? Each item has a border set by CSS, and I can't manage to make subsequent rows not sticking together. I need a few pixels in between them.

Thanks!

Steven De Groote
  • 2,187
  • 5
  • 32
  • 52

2 Answers2

2

you don't want hover on TreeNode then disable it.

yourGrid.setShowRollOver(false);

for second issue, i guess you just need to increase the height of cell.

yourGrid.setCellHeight(40);

ranjeetcao
  • 1,743
  • 2
  • 20
  • 28
0

For your first question: you can use the following:

treeNode.setCustomStyle(stylename);

You may also take a look at this link.

Besides there are so many properties related to style in ListGrid such as following:

grid.setTallBaseStyle(stylename);
grid.setRecordBaseStyleProperty(stylename);

& many more. You should try them to achieve your desired look for the Tree..

Community
  • 1
  • 1
RAS
  • 8,100
  • 16
  • 64
  • 86