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.
Locked
pjbuckley
Posts: 31
Meble kuchenne na zamówienie - na wymiar - Wrocław
Joined: Tue Nov 05, 2019 3:44 pm

Grouping rows of data together

Post by pjbuckley »

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: 14442
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Grouping rows of data together

Post by jvierra »

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: 14442
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Grouping rows of data together

Post by jvierra »

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 »

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 »

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

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

Re: Grouping rows of data together

Post by jvierra »

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.

Locked