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
  • 48,924
  • 13
  • 96
  • 136
Sebastian Dusza
  • 2,302
  • 2
  • 24
  • 49

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
  • 53,866
  • 11
  • 93
  • 123