can't override paint.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've tried to override the paint method and I can't get the overriden paint
method to get called. I put the the method below within the class, but it
never gets called when I open up my form.
By the way, the class is extends DataGridTextBoxColumn, so I wanting to
paint the DataGrid. Thanks!

protected override void Paint(System.Drawing.Graphics g,
System.Drawing.Rectangle bounds,System.Windows.Forms.CurrencyManager source,
int rowNum, System.Drawing.Brush backBrush, System.Drawing.Brush foreBrush,
bool alignToRight)
{
//I put some code here, but it never gets called.
}
 
Ok, I made the MappingName for the DataGridTableStyle object different
than what I set the databinding for the datagrid. It works now, the real
issue was not that the override wasn't working, but that the custom data
table style wasn't getting set. Thanks.
 
Back
Top