Data Grid format

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

Does anyone have an example of how to format VS 2003 Data Grid that looks like the example below?

I want the data to be grouped by the Date Field and display one date for each group of dates and the date to be the heading for each group.

------------------------------------------------------
| | Consignee | Location | MU |
------------------------------------------------------
| February 21, 2005 |
------------------------------------------------------
| | CITY FOREST CORP | LADYSMITH ,WI | 85 |
| | FOX RIVER PAPER | APPLETON ,WI | 81 |
| | FOX RIVER PAPER | APPLETON ,WI | 81 |
| | GEORGE BANTA CO | MENASHA ,WI | 31 |
------------------------------------------------------
| February 22, 2005 |
------------------------------------------------------
| | FOX RIVER PAPER | APPLETON ,WI | 81 |
| | GEORGE BANTA CO | MENASHA ,WI | 80 |
------------------------------------------------------



Thank You


Peter
 
Peter,

For the Windows Forms datagrid, there is no way to do this. You would
have to subclass the control and handle the drawing yourself. There are a
number of third party grids that do this though.

In ASP.NET, the data grid has a lot of custom functionality to render
things of this nature (after all, it's really just a table) and would be a
lot easier.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Does anyone have an example of how to format VS 2003 Data Grid that looks
like the example below?

I want the data to be grouped by the Date Field and display one date for
each group of dates and the date to be the heading for each group.

------------------------------------------------------
| | Consignee | Location | MU |
------------------------------------------------------
| February 21, 2005 |
------------------------------------------------------
| | CITY FOREST CORP | LADYSMITH ,WI | 85 |
| | FOX RIVER PAPER | APPLETON ,WI | 81 |
| | FOX RIVER PAPER | APPLETON ,WI | 81 |
| | GEORGE BANTA CO | MENASHA ,WI | 31 |
------------------------------------------------------
| February 22, 2005 |
------------------------------------------------------
| | FOX RIVER PAPER | APPLETON ,WI | 81 |
| | GEORGE BANTA CO | MENASHA ,WI | 80 |
------------------------------------------------------



Thank You


Peter
 
Peter,

As Nicholas said, it won't be easy with the windows forms datagrid. If
you're doing ASP.NET, that's a different thing altogether.

For Windows Forms, there are a number of 3rd party grids and I would
highly recommend the Syncfusion grid. It's extremely flexible. That
flexibility comes at the cost of ease of use. It takes a little getting used
to, but if you want to do really custom grids, it's definitely the best I've
found.

You can download a trial version from their web site. They have a number
of samples of doing all sorts of customizations. Definitely look at the
samples as trying to figure out how to use it just from the documentation
will likely be overwhelming.

Pete

Does anyone have an example of how to format VS 2003 Data Grid that looks
like the example below?

I want the data to be grouped by the Date Field and display one date for
each group of dates and the date to be the heading for each group.

------------------------------------------------------
| | Consignee | Location | MU |
------------------------------------------------------
| February 21, 2005 |
------------------------------------------------------
| | CITY FOREST CORP | LADYSMITH ,WI | 85 |
| | FOX RIVER PAPER | APPLETON ,WI | 81 |
| | FOX RIVER PAPER | APPLETON ,WI | 81 |
| | GEORGE BANTA CO | MENASHA ,WI | 31 |
------------------------------------------------------
| February 22, 2005 |
------------------------------------------------------
| | FOX RIVER PAPER | APPLETON ,WI | 81 |
| | GEORGE BANTA CO | MENASHA ,WI | 80 |
------------------------------------------------------



Thank You


Peter
 
Back
Top