Get value of a cell in a row in a datagrid in the 'Paint' function?
I have inherited datagridcolumnstyle and in the Paint function I need to do some things based on the cell in the row being rendered.

So for example I have the following:

row 1: color1, name, last name
row 2: color2, name2, last name2
row 3: color3, name3, last name3

the name and last name columns need to be painted in the colour defined in the colour column.

So when the datagridcolumnstyle in relation to name2 is being drawn I need to be able to do something like:

    protected override void Paint( Graphics g, Rectangle bounds, CurrencyManager source, int rowNum, Brush backBrush, Brush foreBrush, bool alignToRight )
          {
Color color = (Color)GetRow( rowNum ).GetCell(color1).Value;
    }
Get value of a cell in a row in a datagrid in the 'Paint' function?
===

I have inherited datagridcolumnstyle and in the Paint function I need to do some things based on the cell in the row being rendered.

So for example I have the following:

row 1: color1, name, last name
row 2: color2, name2, last name2
row 3: color3, name3, last name3

the name and last name columns need to be painted in the colour defined in the colour column.

So when the datagridcolumnstyle in relation to name2 is being drawn I need to be able to do something like:

    protected override void Paint( Graphics g, Rectangle bounds, CurrencyManager source, int rowNum, Brush backBrush, Brush foreBrush, bool alignToRight )
          {
Color color = (Color)GetRow( rowNum ).GetCell(color1).Value;
    }