can't override paint.

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.
}
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top