Search found 88 matches

by IanUoY
Mon Aug 03, 2020 2:35 am
Forum: PowerShell GUIs
Topic: datagridview event firing
Replies: 15
Views: 1058

Re: datagridview event firing

ok thanks but how do I add two selected columns together?
by IanUoY
Mon Aug 03, 2020 2:07 am
Forum: PowerShell GUIs
Topic: datagridview event firing
Replies: 15
Views: 1058

Re: datagridview event firing

Ok, your code I get now. However, it appends columns to my existing datagridview. How to I place selected rows into the existing design. Also, can I add GivenName and Surname to create one column via the select method? Do you have any videos, etc with regard to the datagridview and how to best use? ...
by IanUoY
Mon Aug 03, 2020 1:33 am
Forum: PowerShell GUIs
Topic: datagridview event firing
Replies: 15
Views: 1058

Re: datagridview event firing

The $false was my way of not applying anything to that column and setting it to unchecked as it is a checkbox.

I'll check your code.

(Incidentally, if I did use buttons, is they a way of setting the text of the an individual button in the grid?)
by IanUoY
Mon Aug 03, 2020 1:11 am
Forum: PowerShell GUIs
Topic: datagridview event firing
Replies: 15
Views: 1058

Re: datagridview event firing

Once I've executed the above code I populate the grid as below:
if ($members -ne $null)
{
foreach ($member in $members)
{
$dgvMembers.Rows.Add($false, ($member.GivenName + " " + $member.Surname), $member.samAccountName)
}
}
by IanUoY
Mon Aug 03, 2020 12:47 am
Forum: PowerShell GUIs
Topic: datagridview event firing
Replies: 15
Views: 1058

Re: datagridview event firing

I populate the datagridview with AD members using following code: $members = get-aduser -Filter { Surname -like $searchString } -SearchBase "OU=xxx,DC=xxx,DC=xxx,DC=xxx,DC=xxx" | Sort-Object GivenName, Surname But quite simply the value of the status checkbox using on cellcontentclick is only picked...
by IanUoY
Fri Jul 31, 2020 3:33 am
Forum: PowerShell GUIs
Topic: datagridview event firing
Replies: 15
Views: 1058

Re: datagridview event firing

I'm afraid that didn't work. When I first click the datagridview checkbox, it fires the event, however it does not recognise that the checkbox is now ticked, presumably because the event fires immediately cell is clicked rather than after the tick is put there. In the code I check whether the checkb...
by IanUoY
Thu Jul 30, 2020 8:03 am
Forum: PowerShell GUIs
Topic: datagridview event firing
Replies: 15
Views: 1058

Re: datagridview event firing

Sorry I should just clarify something. It is when I click the checkbox event, that I get the correct information back. This is because the value is already true, even though after clicking it again, it remove the check. I need someway of checking if the checkbox has changed...have tried state change...
by IanUoY
Thu Jul 30, 2020 7:30 am
Forum: PowerShell GUIs
Topic: datagridview event firing
Replies: 15
Views: 1058

Re: datagridview event firing

Apologies, could a moderator move to the correct forum please?
by IanUoY
Thu Jul 30, 2020 7:27 am
Forum: PowerShell GUIs
Topic: datagridview event firing
Replies: 15
Views: 1058

datagridview event firing

I have a datagridview with a checkbox column. I've been unable to fire an event immediately after I've ticked the checkbox. eg CellClick etc obviously fire immediately, but I wish to execute some code after I've ticked the checkbox. How do I do this. Tried so many cell events and none seem to work I...
by IanUoY
Wed Jul 22, 2020 8:40 am
Forum: PowerShell GUIs
Topic: Outputting textbox.text into html table
Replies: 3
Views: 674

Re: Outputting textbox.text into html table

Perfect...thank you :)