ListView / DataGridView with multiple rows in the header
Hi,
I'm using Visual Studio 2005 and i'm trying to achieve a list view / datagrid with the following structure
Code:
| Category Heading 1 | Category Heading 2 |
-------------------------------------------------------------
| Value 1 | Value 2 | Value 3 | Value 1 | Value 2 | Value 3 |
-------------------------------------------------------------
| 1 | 2 | 3 | 1 | 2 | 3 |
| 1 | 2 | 3 | 1 | 2 | 3 |
| 1 | 2 | 3 | 1 | 2 | 3 |
-------------------------------------------------------------
I have heard something about a gridview been able to do this, but i am using the .Net 2.0 and don't have this option available to me as far as i know.
I believe this is probably something people have had to do quite a bit before so I'm guessing theres a solution out there already for this.
Any help would be much appreciated.
Andrew
Re: ListView / DataGridView with multiple rows in the header
Dear Holderness,
I hereby given the link for datagrid program, i hope it will help to you.
http://www.rustemsoft.com/dgvcolumns.asp
With Regards,
Boopathiraja.N
Re: ListView / DataGridView with multiple rows in the header
Dear Holderness,
If u got your expected result kindly acknowledge about that. otherwise you will ask query regarding your doubt. we will try to solve the query.
With Regards,
BoopathiRaja.N.
Re: ListView / DataGridView with multiple rows in the header
Quote:
Originally Posted by
holderness_andy
Hi,
I'm using Visual Studio 2005 and i'm trying to achieve a list view / datagrid with the following structure
Code:
| Category Heading 1 | Category Heading 2 |
-------------------------------------------------------------
| Value 1 | Value 2 | Value 3 | Value 1 | Value 2 | Value 3 |
-------------------------------------------------------------
| 1 | 2 | 3 | 1 | 2 | 3 |
| 1 | 2 | 3 | 1 | 2 | 3 |
| 1 | 2 | 3 | 1 | 2 | 3 |
-------------------------------------------------------------
What you are asking for is a datagrid which contains ánother datagrid in each column. IMHO this could be achieved by creating a userdefined column control and then inserting it into your main datgridview whichcontains only one row but ( in your picture )2 or more columns.
The inserted grid then may have the columns you need and can be different for each of this 'DataGridViewGridViewColumn' ( In you example they both have 3 columns )
This needs to learn how to create Userdefined controls.
BTW Microsoft has an example in MSDN how to create such userdefined Columns and how to implement it.
If the whole thing is mainly a graphically problem and not a problem of dataset, datatables and datasources then I would simple do a label as the top row which shows where you habe which section of data, but if it is a big grid which needs to be scrolled horizontally then this isn't the way to go.