I extended the DGColumn and added a "alternatingItemColors" style it so that it would be possible to set it per column.
I extended the DGItemRenderer and used the background and backgroundColor properties to set the items background color. I added logic in a overridden validateNow function to pick up the color from the alternatingItemColors color array.
The drawback of this approach is that the selection feedback gets almost hidden by the background coloring which would not be the case if the drawRowBackground function is overridden.
The result :
The source is available here.
5 comments:
Hi Sreenivas,
Can we achieve something similar to 'groupedColumns in advanceddatagrid' in datagrid?
I am using flex 2 and my requirment is I need to merge two columns
It would not be possible with DG because the layout logic for this is not currently present in DG. You need to add that logic.
Hi Sreenivas,
Could u pls help me in acheiving that logic? It is very urgent.
I am new to flex and I have no idea of modifying the layout logic.
Thanks in advance.
It is not a very simple logic to add and I am not available for this kind of work.
Hi Sreenivas,
I will try to implement it by myself.
Thanks for your guidance.
Post a Comment