Override Grid Lines on DataGrid

  • Thread starter Thread starter Mark.Larsen
  • Start date Start date
M

Mark.Larsen

What object would I override in order to control painting
of Grid Lines in a DataGrid?
 
Mark,

You can override the grid's OnPaint method, but then your only choice is to
paint all the grid outline yourself, including row headers and column
headers. To the best of my knowledge, there is no other way with the
standard DataGrid.

Consider 3rd party commercial grids as an alternative. These, I believe,
should be much more customizable.
 
I went through the pain of doing my own painting in the
DataGrid OnPaint method which allows me to customize as
needed.
-----Original Message-----
Mark,

You can override the grid's OnPaint method, but then your only choice is to
paint all the grid outline yourself, including row headers and column
headers. To the best of my knowledge, there is no other way with the
standard DataGrid.

Consider 3rd party commercial grids as an alternative. These, I believe,
should be much more customizable.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"(e-mail address removed)"
 
Mark,

I take my hat off, really! How did you manage to handle scrolling?

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

I went through the pain of doing my own painting in the
DataGrid OnPaint method which allows me to customize as
needed.
-----Original Message-----
Mark,

You can override the grid's OnPaint method, but then your only choice is to
paint all the grid outline yourself, including row headers and column
headers. To the best of my knowledge, there is no other way with the
standard DataGrid.

Consider 3rd party commercial grids as an alternative. These, I believe,
should be much more customizable.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"(e-mail address removed)"
 
Back
Top