2

How can I set an icon for some column in dojox.grid.TreeGrid / LazyTreeGrid ?

In dijit.Tree I can overload getIconClass method to acomplish this.

Charles
  • 50,943
  • 13
  • 104
  • 142
Sebastian Dusza
  • 2,470
  • 2
  • 30
  • 54

1 Answers1

2

You can use CSS for that:

.dojoxGridCell[role="gridcell"][idx="3"]:before
{
  content: url(icon.png);
}

This will display icon.png in grid cells (indicated by class dojoxGridCell and attribute role="gridcell") in column with the index 3.

This is using generated content so you might want to consult the support matrix. If you need to support IE6/IE7 then you will need a fallback solution, all other browsers will do fine.

Wladimir Palant
  • 56,865
  • 12
  • 98
  • 126