Search found 73 matches

by lontru
Sun Dec 29, 2019 11:50 am
Forum: PowerShell GUIs
Topic: function ConvertTo-DataTable - Please use DBNull instead
Replies: 4
Views: 760

Re: function ConvertTo-DataTable - Please use DBNull instead

got same error with the posted function.

modified the code a bit to get away with the warnings

Code: Select all

if ($($prop.Value))
{
	$row.Item($prop.Name) = $prop.Value
}
by lontru
Wed Dec 18, 2019 3:14 pm
Forum: PowerShell GUIs
Topic: function ConvertTo-DataTable - Please use DBNull instead
Replies: 4
Views: 760

Re: function ConvertTo-DataTable - Please use DBNull instead

still get error because it null
ERROR: Exception setting "Item": "Exception calling "set_Item" with "2" argument(s): "Cannot set Column 'LastActiveTime' to be null. Please use DBNull instead.""
by lontru
Tue Dec 17, 2019 2:37 pm
Forum: PowerShell GUIs
Topic: function ConvertTo-DataTable - Please use DBNull instead
Replies: 4
Views: 760

function ConvertTo-DataTable - Please use DBNull instead

PowerShell Studio 2018 v5.5.154 Getting this error: Exception setting "Item": "Exception calling "set_Item" with "2" argument(s): "Cannot set Column 'LastActiveTime' to be null. Please use DBNull instead."" $Members = Get-CMCollectionMember -CollectionName $TargetCollection | Select-Object -Property...
by lontru
Wed Nov 27, 2019 2:18 am
Forum: PowerShell GUIs
Topic: combobox filtering/autocomplete input
Replies: 5
Views: 851

Re: combobox filtering/autocomplete input

it works now - but this method req that you know the begining of the word you looking for. $form1_Load={ Update-ComboBox $combobox1 $cars $combobox1.AutoCompleteMode = 'SuggestAppend' $combobox1.AutoCompleteSource = 'ListItems' } if i was looking for these item in the list "Bentley TEST" "Mini TEST"...
by lontru
Wed Nov 27, 2019 1:23 am
Forum: PowerShell GUIs
Topic: combobox filtering/autocomplete input
Replies: 5
Views: 851

Re: combobox filtering/autocomplete input

doesnt do anything? $form1_Load={ Update-ComboBox $combobox1 $cars $combobox1.AutoCompleteMode = 'SuggestAppend' } should it not suggest when i typing : Fo The function im looking for is something like this When i type "on" in the box it should limited the list to Gordon Murray Honda Aston Martin Pr...
by lontru
Tue Nov 26, 2019 3:44 pm
Forum: PowerShell GUIs
Topic: combobox filtering/autocomplete input
Replies: 5
Views: 851

combobox filtering/autocomplete input

Hi Is there a way to filter the result in the combobox to match what you type like this tried a textchanged event on the combobox but when you type in it get invertet the input? $TextChanged = $cars | Where-Object { $_.TemplateName -like "*$($combobox1.Text)*" } Update-ComboBox $combobox1 $TextChang...
by lontru
Wed Nov 06, 2019 3:25 am
Forum: PowerShell GUIs
Topic: $datagridviewLogs_CellContentDoubleClick - not header
Replies: 8
Views: 1115

Re: $datagridviewLogs_CellContentDoubleClick - not header

this works for now, $datagridviewLogs_CellDoubleClick=[System.Windows.Forms.DataGridViewCellEventHandler]{ if ($($_.RowIndex) -gt -1) { $script:SelectedLogfile = $datagridviewLogs.SelectedRows[0].Cells[0].Value $cmtrace2 = "$env:windir\system32\CMTrace.exe" if (Test-Path $cmtrace2 -PathType Leaf) { ...
by lontru
Wed Nov 06, 2019 12:56 am
Forum: PowerShell GUIs
Topic: $datagridviewLogs_CellContentDoubleClick - not header
Replies: 8
Views: 1115

Re: $datagridviewLogs_CellContentDoubleClick - not header

I have inserted your code but the behavior is wierd

the if block should only run if rowindex is greater then -1 but it still run??

I double click on the header - recording show wierd mouse placement.
Image
by lontru
Tue Nov 05, 2019 7:21 am
Forum: PowerShell GUIs
Topic: $datagridviewLogs_CellContentDoubleClick - not header
Replies: 8
Views: 1115

Re: $datagridviewLogs_CellContentDoubleClick - not header

I have these line to prevent file form loading as work around. $datagridviewLogs_ColumnHeaderMouseDoubleClick = [System.Windows.Forms.DataGridViewCellMouseEventHandler]{ $datagridviewLogs.CurrentCell = $null } $datagridviewLogs_ColumnHeaderMouseClick = [System.Windows.Forms.DataGridViewCellMouseEven...
by lontru
Tue Nov 05, 2019 5:04 am
Forum: PowerShell GUIs
Topic: $datagridviewLogs_CellContentDoubleClick - not header
Replies: 8
Views: 1115

Re: $datagridviewLogs_CellContentDoubleClick - not header

when i double click on the header "lastwritetime" it open the selected row. I dont want that to happen.
the gif is to show how the form behave when i double click the header in the grid "lastwritetime"