Any help would be much appreciated.
This is what I would to use it in
class MyGrid : DataGridView
{
// Code to add the enum MyStyle to the Columns Collection, calling it DisplayStyle
private void PaintCell(object sender, DataGridViewCellPaintingEventArgs e)
{
if (this.Columns[e.ColumnIndex].DisplayStyle == MyStyle.Currency)
{
// code here
}
}
enum MyStyle
{
Currency, Accounting, Other
}
}

VulpesRank #55 · 29.2K reputationPosted May 25, 2011, 2:25 AM EDT
Posted May 23, 2011, 10:29 PM EDT
Grant McConville18 reputationPosted May 23, 2011, 10:56 PM EDT
The variable I would like to add is a enum called MyStyle
Thankyou
VulpesRank #55 · 29.2K reputationPosted May 24, 2011, 12:37 AM EDT
Grant McConville18 reputationPosted May 24, 2011, 12:02 PM EDT
Is there any chance you could post some code so I can understand this more clearly.
At the moment I do not know where to start
Thank you
Grant McConville
Grant McConville18 reputationPosted May 25, 2011, 1:21 AM EDT
However, this.Cols[e.ColumnIndex].ColumnType does not work (DataGridViewColumn does not contain a definition for 'ColumnType' and no extension method etc etc)
It has a few other errors as well, such as the line 'public class MyColumns : DataGridViewColumnCollection' saying DataGridViewColumnCollection does not contain a constructor that takes 0 arguments
Am I even close to looking at this correctly, or am I completely wrong
Thanks
Grant McConville
Grant McConville18 reputationPosted May 25, 2011, 12:01 PM EDT