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.
This topic is 4 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
pjbuckley
Posts: 31
Last visit: Mon Jan 06, 2020 12:21 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: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

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: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

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
Last visit: Mon Jan 06, 2020 12:21 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
Last visit: Mon Jan 06, 2020 12:21 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: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

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.
This topic is 4 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked