dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Thread: Listview with multiple groups

Threaded View

  1. #1
    Join Date
    Mar 2013
    Posts
    27

    Listview with multiple groups

    Hi
    I have a problem over a month now and I can’t solve it.

    I have a datagridview with 12 columns and it is bound to a datasource
    From these datagridview I create a ListView with 4 columns month, date, name and price.

    Now I want to create three groups.
    The one group under the other with totals and SubTotals and ordered by name and dates.
    I need a group of month and inside of it group of dates with subtotals and totals.

    For example I have these values to my ListView.
    Code:
    Month      Date       Name      Money
    11      20/11/2016    Abdul     12,35 €
    11      25/11/2016    Fabiano   32,85 €
    11      20/11/2016    John       9,52 €
    12      30/12/2016    Paavo     85,62 €
    12      30/12/2016    Sabas    847,22 €
    11      20/11/2016    Babs      35,47 €
    11      20/11/2016    Kaan     112,85 €
    11      25/11/2016    Ealair   512,65 €
    12      30/12/2016    Nacio     54,32 €
    11      25/11/2016    Lado      47,51 €
    And I want the result to be like that.

    Code:
    20/11/2016  Name      Money
                Abdul     12,35 €
                Babs      35,47 €
                John       9,52 €
                Kaan     112,85 €
    Sum of day           170,19 €  <-- Problem A
    25/11/2016
                Ealair   512,65 €
                Fabiano   32,85 €
                Lado      47,51 €
    Sum of day           593,01 €  <-- Problem A
    Sum Of month         763,20 €  <-- Problem B
    30/12/2016
                Nacio     54,32 €
                Paavo     85,62 €
                Sabas    847,22 €
    Sum of day           987,16 €  <-- Problem A
    Sum of month         987,16 €  <-- Problem B
    Total              1.750,36 €
    Any help. How I can do that.
    Last edited by makis_best; December 18th, 2016 at 02:21 PM.

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)