CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2005
    Posts
    5

    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

  2. #2
    Join Date
    Sep 2008
    Posts
    69

    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

  3. #3
    Join Date
    Sep 2008
    Posts
    69

    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.

  4. #4
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: ListView / DataGridView with multiple rows in the header

    Quote Originally Posted by holderness_andy View Post
    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.
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured