Sunday, March 22, 2009

draw background for DataGrid columns

When I read Peter Ent's post about "Coloring the Background of Cells", I need to fill the column in my project, which is programmatically generated, with gradient background fill.
I didn't finish my job at the first try. After I read the post again, I found each column has to be assign a backgroundColor style before DataGrid drawColumnBackground function taking effect.
This function "drawColumnBackground" is called by drawLinesAndColumnBackgrounds function, which is called in updateDisplayList function. So I think I can update each column background by override the updateDisplayList function. I probabely need to update datagrid data as well as column background based on user action.

No comments: