Show Group And Detail Using Datagridview.

Posted on 2009-04-22
Last Modified: 2012-05-06

I have table below:


1. ItemCode
2. ItemName.
3. ItemGroup.


ItemCode   ItemName   ItemGroup
SFD             Softdrink    
CCL            Coca Cola    SFD            
FNT             Fanta           SFD            
SPR             Sprite          SFD            
ACL             Alcohol
TQL             Tequila        ACL
VDK             Vodka         ACL

I want to show it to datagridview like below:

SFD - SoftDrint
     CCL - Coca Cola
     FNT - Fanta
     SPR - Sprint

How could I do it?

Thank you.
Question by:emi_sastra
    LVL 53

    Accepted Solution

    Currently, .Net2.0 DataGridView control did not provide the build-in row grouping function, and I do not think there is any easy way to customizing this function.

    I know a 3rd party Grid control which implemented this function, if you are curious, you can give it a look:
    LVL 53

    Assisted Solution

    LVL 1

    Author Comment

    Hi Dhaest,

    It helps.

    Thank you very much for your help.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
    Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now