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
Out-DataTable
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.
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.
- jsira2003@yahoo.com
- Posts: 117
- Last visit: Tue Jul 11, 2023 6:18 am
Re: Out-DataTable
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
thanks,
John
Re: Out-DataTable
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.
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.