Out-DataTable

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 5 years and 5 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
User avatar
jsira2003@yahoo.com
Posts: 117
Last visit: Tue Jul 11, 2023 6:18 am

Out-DataTable

Post by jsira2003@yahoo.com »

When I need a table I always use Chad Miller's out-datatable function. Is there another routine that can be used in lieu of this? Does Sapien have it own datatable function? If so how do you use it?

Thank You,
John
User avatar
jsira2003@yahoo.com
Posts: 117
Last visit: Tue Jul 11, 2023 6:18 am

Re: Out-DataTable

Post by jsira2003@yahoo.com »

I want to pass to the function a [system.collections.arraylist]$motorStats and obtain a datatable. I want to store the table in a variable called $dtMotorStats. I tried to use the convertto-datatable function I saw sapien had written and this did not work. Only the out-datatable function appeared to work for the most part with only a few of columns which did not sort correctly in my datagrid. What was interesting is everything sorts correctly in the out-gridview so I know my columns are of the correct datatype.

thanks,
John
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Out-DataTable

Post by jvierra »

ConvertTo-DataTable works to add any collection to a DataGridView and with all other data bound controls. What is happening that makes you think it doesn't work.

What is it that does not sort correctly? Remember that numbers stored as strings will not sort as expected in ay utility or data function.
This topic is 5 years and 5 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