Search found 19 matches

by raphaelgj
Tue Jan 15, 2019 12:45 pm
Forum: PowerShell GUIs
Topic: Listbox - scroll insanely slow/choppy with mouse wheel but not scrollbar?
Replies: 4
Views: 237

Re: Listbox - scroll insanely slow/choppy with mouse wheel but not scrollbar?

Thank you, however the same behaviour is present. If I give the scrollwheel a long scroll, it will scroll up the distance but not instantly like it would in notepad for example, it does it over 1-2 seconds...
by raphaelgj
Tue Jan 15, 2019 12:00 pm
Forum: PowerShell GUIs
Topic: Listbox - scroll insanely slow/choppy with mouse wheel but not scrollbar?
Replies: 4
Views: 237

Listbox - scroll insanely slow/choppy with mouse wheel but not scrollbar?

I have a simple listbox with around 70 items in it. If I click and move the SCROLLBAR, it's really smooth and there is no delay whatsover. If I scroll with the MOUSEWHEEL, it's incredibly choppy and delayed, slow. Why is that and how can it be fixed? Check this recording to see it in action using th...
by raphaelgj
Fri Nov 16, 2018 4:17 pm
Forum: PowerShell GUIs
Topic: Export Datagridview to CSV
Replies: 11
Views: 955

Re: Export Datagridview to CSV

jvierra wrote:
Fri Nov 16, 2018 4:10 pm
Just add rows to the DataTable as you need. Once bound to the grid they will show automatically. I have used a grid for a dynamic logger and to dynamically display the results of a job as they arrived.
Ah, true. I don't need refresh. So it's the right way then?
by raphaelgj
Fri Nov 16, 2018 4:05 pm
Forum: PowerShell GUIs
Topic: Export Datagridview to CSV
Replies: 11
Views: 955

Re: Export Datagridview to CSV

Ok I figured it out. My goal by the way is to see the rows being added in real time, I have a lot of variables and don't want to build the whole datatable and THEN show it in the datagridview, so here is a condensed example of what i'm doing (which is actually a lot more complex over a few hundred l...
by raphaelgj
Fri Nov 16, 2018 2:24 pm
Forum: PowerShell GUIs
Topic: Export Datagridview to CSV
Replies: 11
Views: 955

Re: Export Datagridview to CSV

You need to start with a DataTable. Why is that so hard? Just convert your object collection to a DataTable. Post the code that loads your grid and I will give you an example. I now see my mistake was to just use rows.add to display the data and not put these rows in a data table. I'll change my co...
by raphaelgj
Fri Nov 16, 2018 1:28 pm
Forum: PowerShell GUIs
Topic: Export Datagridview to CSV
Replies: 11
Views: 955

Re: Export Datagridview to CSV

Since the data is already generated with a different method than from a DataTable, my question is more like : How do I create a DataTable from an EXISTING DataGridView? So far I have : $DataTableCSV = New-Object System.Data.DataTable $DataTableCSV.TableName = "DataTableCSV" $DataTableCSV.Columns.Add...
by raphaelgj
Fri Nov 16, 2018 12:46 pm
Forum: PowerShell GUIs
Topic: Export Datagridview to CSV
Replies: 11
Views: 955

Re: Export Datagridview to CSV

jvierra wrote:
Fri Nov 16, 2018 12:33 pm
You have to load the grid from a DataTable in order to have a "data bound" row.
In my case since the grid is created from a lot of different variables using :

$datagridviewInfo.Rows.Add(" ", " ")



Is there a way to create a new DataTable FROM the already populated rows??
by raphaelgj
Fri Nov 16, 2018 12:28 pm
Forum: PowerShell GUIs
Topic: Export Datagridview to CSV
Replies: 11
Views: 955

Export Datagridview to CSV

In my application, I have a datagridview that looks like this (2 columns displaying info with no row header, no column header) : PROPERTY | VALUE PROPERTY | VALUE PROPERTY | VALUE PROPERTY | VALUE PROPERTY | VALUE Which is created by multiple : $datagridviewInfo.Rows.Add("PropertyX", $ValueX) Once t...
by raphaelgj
Tue Nov 13, 2018 5:51 am
Forum: PowerShell GUIs
Topic: Output being cut in compiled EXE but not is PS Studio
Replies: 8
Views: 572

Re: Output being cut in compiled EXE but not is PS Studio

There turns out to be an easier way to do this. Just set the width in Out-String. It defaults to current console width which is 80 if it has not been explicitly set to a different value. $textboxContenu.text = Get-ChildItem -Path $($folderbrowsermoderndialog1.SelectedPath) -Recurse | select Name,Di...
by raphaelgj
Mon Nov 12, 2018 6:41 pm
Forum: PowerShell GUIs
Topic: Output being cut in compiled EXE but not is PS Studio
Replies: 8
Views: 572

Re: Output being cut in compiled EXE but not is PS Studio

How should it be approached code wise then ? Do I need to specify console width or change the command somehow? New to this issue of width being different in studio than compiled.