How do i select from a combo box.
I want to DoubleClick on the datagridview1 and get the selected value with
$logfile = $datagridview1.Rows[$($datagridview1.CurrentCell.RowIndex)].Cells[0].Value
how do i select the same "file" in the combobox? by code when double click action?
Solved - Select value from combox box by value how?
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Solved - Select value from combox box by value how?
- Attachments
-
- gridview_combo_test.psf
- (22 KiB) Downloaded 35 times
Last edited by lontru on Tue Jan 31, 2023 5:14 am, edited 1 time in total.
Re: Select value from combox box by value how?
$combobox1.SelectedIndex = $combobox1.Items.IndexOf("$logfile")
did the trick
did the trick
Code: Select all
$datagridview1_DoubleClick={
$logfile = $datagridview1.Rows[$($datagridview1.CurrentCell.RowIndex)].Cells[0].Value
$textbox1.Text = $logfile
$combobox1.SelectedIndex = $combobox1.Items.IndexOf("$logfile")
}