Product, version and build:
32 or 64 bit version of product: 64 bit
Operating system: Win Srv 2012R2
32 or 64 bit OS: 64 bit
We're trying to figure out how we can best have a dropdown list that contains two columns. For example:
-------------------------------
Select citrix farm V
--------------------------------
When clicking on the downwards arrow (V) it should display:
----------------------------------
ServerName1 | XenApp 6
ServerName2 | XenApp 7.15
----------------------------------
After selecting one from the list it should display:
----------------------------------
ServerName1 | XenApp 6
----------------------------------
For now we use a simple ComboBox that contains both values concatenated to one string. Which makes it hard to work with the values selected, as they each represent a property. I looked at a DataGrid, but it doesn't show a drop down box with a small arrow.
Any advice would be helpful. Thank you very much.
What control to use?
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.
Re: What control to use?
[TOPIC MOVED TO POWERSHELL GUIS FORUM BY MODERATOR]
There is not built-in multi-column ComboBox. I'm not clear as to what you are trying to accomplish. Do you want to distinguish the two values more? Or do you want a specific value when selecting an item from combobox? If so, I recommend using objects with properties and then set the ValueMember property of the combobox to the name of the property you wish to use as the value.
There is not built-in multi-column ComboBox. I'm not clear as to what you are trying to accomplish. Do you want to distinguish the two values more? Or do you want a specific value when selecting an item from combobox? If so, I recommend using objects with properties and then set the ValueMember property of the combobox to the name of the property you wish to use as the value.
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: What control to use?
Easiest way is to create a three property object with one to display. Add the objects to the "Items" of the ComboBox and set the "DisplayMember" property you want to display. Items can be retrieved by name:
Object is:
DisplayName, ServerNAme, AppNAme
$ComboBox.Items[1].ServerName
In SelectedIndexChanged:
$combobox.SelectedItem.ServerName
$combobox.SelectedItem.AppName
Object is:
DisplayName, ServerNAme, AppNAme
$ComboBox.Items[1].ServerName
In SelectedIndexChanged:
$combobox.SelectedItem.ServerName
$combobox.SelectedItem.AppName