Paints a System.Windows.Forms.DataGridColumnStyle with the specified System.Drawing.Graphics, System.Drawing.Rectangle, System.Windows.Forms.CurrencyManager, row number, System.Drawing.Brush, and foreground color.
- g
- The System.Drawing.Graphics object to draw to.
- bounds
- The bounding System.Drawing.Rectangle to paint into.
- source
- The System.Windows.Forms.CurrencyManager of the System.Windows.Forms.DataGrid the that contains the column.
- rowNum
- The number of the row in the underlying data table.
- backBrush
- A System.Drawing.Brush that paints the background.
- foreBrush
- A System.Drawing.Brush that paints the foreground color.
- alignToRight
- A value indicating whether to align the column's content to the right. true if the content should be aligned to the right; otherwise, false.
The DataGridTextBoxColumn.Paint(System.Drawing.Graphics, System.Drawing.Rectangle, CurrencyManager, int) method uses the DataGridColumnStyle.GetColumnValueAtRow(CurrencyManager, int) to determine the value to draw in the cell. The DataGridTextBoxColumn.PaintText(System.Drawing.Graphics, System.Drawing.Rectangle, string, bool) method is called to draw the cell and its contents.