473,287 Members | 1,395 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

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 2223
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
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
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
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
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
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
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
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
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
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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.