473,513 Members | 7,598 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Override Grid Lines on DataGrid

What object would I override in order to control painting
of Grid Lines in a DataGrid?
Nov 15 '05 #1
3 2235
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

"Ma*********@hill.af.mil" <an*******@discussions.microsoft.com> wrote in
message news:06****************************@phx.gbl...
What object would I override in order to control painting
of Grid Lines in a DataGrid?


Nov 15 '05 #2
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 topaint all the grid outline yourself, including row headers and columnheaders. To the best of my knowledge, there is no other way with thestandard 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

"Ma*********@hill.af.mil" <an*******@discussions.microsoft.com> wrote inmessage news:06****************************@phx.gbl...
What object would I override in order to control painting of Grid Lines in a DataGrid?


.

Nov 15 '05 #3
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

"Ma*********@hill.af.mil" <an*******@discussions.microsoft.com> wrote in
message news:03****************************@phx.gbl...
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

"Ma*********@hill.af.mil"

<an*******@discussions.microsoft.com> wrote in
message news:06****************************@phx.gbl...
What object would I override in order to control painting of Grid Lines in a DataGrid?


.


Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2559
by: xp | last post by:
I have a datagrid on my VB.Net form. I am trying to use the DblClick event of the grid, but when I run the program and double click on the grid, the event was not evoked. Why? Thanks xp
0
1653
by: Frnak McKenney | last post by:
I have a (small) multi-table database application which allows edits, print reports, and has two scrolling screen displays which show information merged from multiple tables. I'm having trouble...
0
1160
by: James lennon | last post by:
I am attempting to format a Window.Forms.DataGrid. How do I set the color for the grid lines in the data grid header. The GridLineColor attribute in the table style does not set the color of the...
3
2898
by: Mark.Larsen | last post by:
I made a class that extends DataGridColumnStyle. In the Paint override I draw a border around each cell in the column. All cells look fine except for the last one (final row). The lines I draw...
0
1050
by: Mark.Larsen | last post by:
What object draws the grid lines in a DataGrid? I need to override its paint method in order to change the border of cells in a column.
4
2992
by: Mike L | last post by:
I'm open for any suggestions on how to better program this. I want the user to select a license from a combo box, cboPrivilege and then the user will click the add button, then a record will be...
3
3371
by: SStory | last post by:
I have a style sheet for my site. It has various classes in it. It has <A: styles defined for all anchor tags. I have a datagrid in ASP.NET with a stylesheet linked to the page. It defines...
4
2284
by: Woody Splawn | last post by:
I have a grid with, lets say, 3 fields in it, Debit, Credit and Comments, in that order. When the user moves to the debit field, if he enters data in it, I would like for the cursor to skip past...
4
1323
by: Ralf Rennartz | last post by:
Hello NG, i have the following function which works fine: Public Shared Function getFullDatagrid() As System.Web.UI.WebControls.DataGrid Dim myGrid As New...
0
7254
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7094
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7519
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5677
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5079
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1585
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.