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
}
}
VulpesPosted May 25, 2011, 6:25 AM
Grant McConvillePosted May 25, 2011, 4:01 PM
Grant McConvillePosted May 25, 2011, 5:21 AM
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 McConvillePosted May 24, 2011, 4:02 PM
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
VulpesPosted May 24, 2011, 4:37 AM
Grant McConvillePosted May 24, 2011, 2:56 AM
The variable I would like to add is a enum called MyStyle
Thankyou
Posted May 24, 2011, 2:29 AM