Tree Grid View (TGV): How I can render a cell as an icon/image?

Hello,

I have a question regarding the TreeGridview.

We need to set different row icons on a TreeGridView based on a ItemType property called kind of "xx_type".

We already have a TreeGridview that uses the ItemType icons but they are too generic and we need to replace them
based on a property called "xx_type".

I am thinking of 2 possibilities:

1. Render a new cell as an icon/image. Is it possible? As I see, the designer doesn't offer this possibility.
2. Replace the existing Icons dynamically using a client method. Is there a possibility to do that?

I would prefer 1'st option,I think second option is by far most complicated.

If somebody knows and can help I would really appreciate that.

Thank you.

Parents Reply Children
  • Thank you, I was unaware you could use an image property on the item as the Icon in tree grid.  I have managed to get somewhere close by creating an image column which can then be used as the icon which I populate in advance of running the query. 

    Can you create the image dynamically at run time? I.e. if you don't know the property until the query is run. Such as a Part BOM, where you don't know if a part is a parent or a child until the context item is passed to the query.

  • Did you make an extra column or did you overwrite the standard ItemType indicators? In my few quick tests I only used static codetree images. The Method rb_DefaultColumnBuilderMethod is used for the rendering, maybe this one is a good start for further investigations.