Search found 55 matches

by ClipperXTP
Fri Mar 26, 2021 8:38 am
Forum: PowerShell GUIs
Topic: Exporting CSV from Datagridview reverses order
Replies: 6
Views: 1803

Re: Exporting CSV from Datagridview reverses order

That is very useful, thanks v much!
by ClipperXTP
Thu Mar 25, 2021 11:57 am
Forum: PowerShell GUIs
Topic: Exporting CSV from Datagridview reverses order
Replies: 6
Views: 1803

Re: Exporting CSV from Datagridview reverses order

I was being stupid. I can just export the array that populated the Datagridview instead..
by ClipperXTP
Thu Mar 25, 2021 9:49 am
Forum: PowerShell GUIs
Topic: Exporting CSV from Datagridview reverses order
Replies: 6
Views: 1803

Re: Exporting CSV from Datagridview reverses order

Hi Jvierra Thanks for getting back to me. Yes, understood. Let me put it another way - I put a list of hostnames in a textbox. My query on the list of hostnames returns data to the datagridview in the same order as it is listed in the textbox. All good so far. I do not sort it once it is in there, I...
by ClipperXTP
Thu Mar 25, 2021 5:56 am
Forum: PowerShell GUIs
Topic: Exporting CSV from Datagridview reverses order
Replies: 6
Views: 1803

Exporting CSV from Datagridview reverses order

Hi - I have an Export CSV button which exports the contents of the Datagridview to CSV using the code below. It exports the data but in reverse order - the top row of my datagridview is the last row of my CSV file. Can anyone suggest a clean way to maintain row order? $datagridviewhosts.SelectAll() ...
by ClipperXTP
Fri Dec 04, 2020 4:14 am
Forum: PowerShell GUIs
Topic: Datagridview - Pasting from Excel Help
Replies: 1
Views: 945

Datagridview - Pasting from Excel Help

Hi I am using jvierra's excellent earlier post to copy data from Excel to a Datagridview from here: https://www.sapien.com/forums/viewtopic.php?t=9885 I have created a datagridview in the Designer. I have not added or defined any columns. My excel data has no headers. The first column in spreadsheet...
by ClipperXTP
Wed Aug 26, 2020 5:33 am
Forum: PowerShell GUIs
Topic: Designer and Datagridviews - Font Sizes Lost after reopening
Replies: 0
Views: 11874

Designer and Datagridviews - Font Sizes Lost after reopening

Hi I change my ColumnHeadersDefaultCellStyle / DefaultCellStyle in the Designer from MS Sans Serif 12pt (the default) to Segui 8pt from the font dropdowns for my DataGridViews in PowerShell Studio 2019. Before I click OK, I see it has changed 8 pt to 7.8 pt but no worries. I run the project and it s...
by ClipperXTP
Thu Jul 23, 2020 11:03 pm
Forum: PowerShell GUIs
Topic: Show-SplashScreen and GUI Load Times
Replies: 3
Views: 1867

Re: Show-SplashScreen and GUI Load Times

Hi JV thanks for your reply. It's opening one database connection. There's about 4000 lines of code that do various queries to machines and web services when buttons are clicked. On load there is also a set control theme to 'dark' which takes a couple of seconds even on the most basic form. As I sai...
by ClipperXTP
Thu Jul 23, 2020 5:36 am
Forum: PowerShell GUIs
Topic: Show-SplashScreen and GUI Load Times
Replies: 3
Views: 1867

Show-SplashScreen and GUI Load Times

It takes about 6/7 seconds for my Windows Form GUI to load after double click. I've had some of my users comment that when they double click on the .exe they think nothing has happened and they double click it again etc. I tried Show-SplashScreen in the form load event and it looks great but the spl...
by ClipperXTP
Mon Jun 22, 2020 4:19 am
Forum: PowerShell
Topic: Speed up array searches?
Replies: 3
Views: 2144

Re: Speed up array searches?

This is excellent, thanks very much
by ClipperXTP
Fri Jun 19, 2020 8:25 am
Forum: PowerShell
Topic: Speed up array searches?
Replies: 3
Views: 2144

Speed up array searches?

Hi I am running a powershell query against SQL database to pull back computer name and model for about 6,000 computers $adapter = new-object system.data.sqlclient.sqldataadapter ($query, $conn) $table = new-object system.data.datatable $adapter.Fill($table) | out-null $compArray = @($table) --------...