public override void DataGridPaintParentRows (Graphics g, Rectangle clip, DataGrid grid)
{
Rectangle rect_row = new Rectangle ();
rect_row.X = grid.ParentRowsArea.X;
rect_row.Width = grid.ParentRowsArea.Width;
rect_row.Height = (grid.CaptionFont.Height + 3);
object[] parentRows = grid.data_source_stack.ToArray();
Region current_clip;
Region prev_clip = g.Clip;
for (int row = 0; row < parentRows.Length; row++) {
rect_row.Y = grid.ParentRowsArea.Y + row * rect_row.Height;
if (clip.IntersectsWith (rect_row) == false)
continue;
current_clip = new Region (rect_row);
current_clip.Intersect (prev_clip);
g.Clip = current_clip;
DataGridPaintParentRow (g, rect_row, (DataGridDataSource)parentRows[parentRows.Length - row - 1], grid);
current_clip.Dispose ();
}
g.Clip = prev_clip;
}