you can pass data to itemRenderer these ways:
1. static class variables
2. global variables in program
3. data for rendering. - It's the best way! You can access not only data from dataFiled, but all data object.
The other thing you can do is pass in a ClassFactory as an itemRenderer to the DataGridColumn--this will let you configure your renderer to some extent and is somewhat more robust than global or static variables. However, as Natasha pointed out, data-driven renderers are generally the best idea.
Can you show how? syntax
Something along the lines of this:
Then just assign these ClassFactory instances as itemRenderers for
I realize this is a very old post, but I also need to pass an object (different from 'data') to an item renderer. I subclassed DataGridColumn, per your suggestion, adding a new property to it that will accept the object I want to pass to my item renderer. Can you give me an example of how to pick the property from the column?
Renderers that implement IDropInListItemRenderer can get the column from
In the commitProperties, measure, or updateDisplayList methods