Search found 709 matches

by dan.potter
Wed May 10, 2017 11:48 am
Forum: PowerShell GUIs
Topic: datagridview datatable update method
Replies: 4
Views: 945

Re: datagridview datatable update method

That'll all done. Datasource is sql. When you change the value cell manually and use the update method it writes the changes back to sql. If I change a cell value $row.cells[1].value = 'something' and call the update method it doesn't.
by dan.potter
Wed May 10, 2017 10:19 am
Forum: PowerShell GUIs
Topic: datagridview datatable update method
Replies: 4
Views: 945

datagridview datatable update method

Why doesn't the update method work for programmatic changes to the datagridview?

This is what I was trying to do.

Code: Select all

$datagridview2.SelectedRows | %{
$_.Cells[6].Value = $ostemplate.SelectedItem
}

$invadapter.Update($datagridview2.DataSource)
by dan.potter
Tue May 02, 2017 6:56 am
Forum: PowerShell GUIs
Topic: Save a treeview on child form?
Replies: 2
Views: 592

Re: Save a treeview on child form?

Thanks!
by dan.potter
Mon May 01, 2017 7:54 am
Forum: PowerShell GUIs
Topic: Save a treeview on child form?
Replies: 2
Views: 592

Save a treeview on child form?

I have a child form that loads a tree from vmware. The child form may be opened multiple times. Each time it's opened I want keep the previous view instead of loading the tree again. Is this possible?
by dan.potter
Fri Mar 03, 2017 5:22 am
Forum: PowerShell GUIs
Topic: DataGridView Event not firing on every click
Replies: 5
Views: 1152

Re: DataGridView Event not firing on every click

If you attach the psf it will be easier to fix than rebuilding the entire form from scratch.
by dan.potter
Fri Mar 03, 2017 5:12 am
Forum: PowerShell GUIs
Topic: DataGridView Event not firing on every click
Replies: 5
Views: 1152

Re: DataGridView Event not firing on every click

Tip. Instead of the if/else, you can do this.

$checkboxEnableAccount.Enabled = $AccountStatus
$checkboxEnableAccount.Checked = $AccountStatus
by dan.potter
Tue Feb 21, 2017 1:22 pm
Forum: Windows PowerShell
Topic: aduser filter single qoute with wildcard.
Replies: 2
Views: 1042

Re: aduser filter single qoute with wildcard.

msdn has doubles, news to me :-)
by dan.potter
Tue Feb 21, 2017 1:12 pm
Forum: Windows PowerShell
Topic: aduser filter single qoute with wildcard.
Replies: 2
Views: 1042

aduser filter single qoute with wildcard.

Has this always worked or did something changed? I could have sworn 'potter*' was interpreted literally in previous versions.

get-aduser -filter {name -like 'potter*'}
by dan.potter
Wed Feb 15, 2017 8:02 am
Forum: PowerShell GUIs
Topic: How to separate out code?
Replies: 12
Views: 2026

Re: How to separate out code?

why not just use the code folding plus regions? Put all your tab control events within one region.

Like this, it's very simple to manage the code.
Untitled.png
Untitled.png (15.82 KiB) Viewed 578 times