Grouping rows of data together

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Post Reply
pjbuckley
Posts: 31
Joined: Tue Nov 05, 2019 3:44 pm

Grouping rows of data together

Post by pjbuckley » Mon Nov 18, 2019 4:57 pm

The last thing (hopefully) i need help with to finish this project is around grouping data together and displaying the data in a DGV. I am iterating through csv files with each file representing a single day in the week. I would like the data from each file to be grouped or seperated within the DGV and possibly have a header with the file name separating each file.

How would i group the data together and display that into my DGV?

jvierra
Posts: 14016
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Grouping rows of data together

Post by jvierra » Mon Nov 18, 2019 5:38 pm

For that it would be best to use a ListView. ListView have a concept of grouping and allows defining groups with headers and details. DBV does not have this capability.

jvierra
Posts: 14016
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Grouping rows of data together

Post by jvierra » Mon Nov 18, 2019 5:40 pm

Here is one solution in DGV that seems simple enough.

https://stackoverflow.com/questions/244 ... tagridview

pjbuckley
Posts: 31
Joined: Tue Nov 05, 2019 3:44 pm

Re: Grouping rows of data together

Post by pjbuckley » Mon Nov 18, 2019 6:38 pm

Im stuck in DGV land at this point but thanks for the *squirrel* moment... :) :D

pjbuckley
Posts: 31
Joined: Tue Nov 05, 2019 3:44 pm

Re: Grouping rows of data together

Post by pjbuckley » Tue Nov 19, 2019 8:53 am

Any chance you can help translate that article into powershell? I have yet to figure out how to do that.

jvierra
Posts: 14016
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Grouping rows of data together

Post by jvierra » Tue Nov 19, 2019 9:00 am

First figure out what the code is doing then use PowerShell code to do the same thing. C# is very close to PS code just translate it until you understand the method then write it in PowerShell.
RIght now I don't have time to do that for you.

Post Reply