[Flex] One labelfunction for multiple datagridcolumns
On March 27, 2007, Flash / Flex - 2 CommentsThe labelfunction of a listbased component is nice, but a bit limited.
For instance, you have to specify the (data)fieldname inside the function, which makes it impossible to use it for other columns. Wouldn’t it be nice if you could write one labelfunction for all your columns? I thought it would.
In order to accomplish this, I needed to have the columndata inside the labelFunction. At first, I was thinking of extending the labelFunction, but that wouldn’t help me much, because Flex was still sending only the original data and not the columndata. So I went deeper in the component, searching for the function responsible for calling the labelFunction.