Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to Hide Dictionary Key in LookupEdit using C#?
    primarykey
    data
    text
    <p>I created a normal winform and added <code>LookUpEdit</code> to my form and created a dictionary which contains <code>string</code> keys and <code>string</code> values. I loaded my <code>LookupEdit.Properties.Datasource</code> using the <code>BindingSource</code>.<br> When Lookupedit is loaded, I want to hide dictionary Key:</p> <pre><code>private LookUpEdit lookup1; void InitializeComponent() {     //...     this.lookup1 = new DevExpress.XtraEditors.LookUpEdit(); this.lookup1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); //this.cmbCards.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.lookup1.Location = new System.Drawing.Point(400, 125); this.lookup1.Name = "Test"; this.lookup1.Properties.ShowHeader = false; this.lookup1.Properties.ValueMember = "Test"; this.lookup1.Size = new System.Drawing.Size(400, 85); this.lookup1.TabIndex = 0; this.lookup1.Tag = ""; this.lookup1.Properties.BestFit(); this.lookup1.Properties.ShowDropDown = DevExpress.XtraEditors.Controls.ShowDropDown.SingleClick; this.lookup1.Properties.BestFit(); this.lookup1.Properties.PopupWidth = 50; this.lookup1.Properties.PopupSizeable = false;     //... } public partial class Form1 : Form { public Form1() { InitializeComponent(); Dictionary&lt;string, string&gt; dic = new Dictionary&lt;string, string&gt;(); dic.Add("Test", "1"); dic.Add("Test2", "2"); dic.Add("Test3", "3"); dic.Add("Test4", "4"); dic.Add("Test5", "5"); dic.Add("Test6", "6"); dic.Add("Test7", "7"); dic.Add("Test8", "8"); dic.Add("Test9", "9"); dic.Add("Test10", "10"); this.lookup1.Properties.DataSource = new BindingSource(dic, null); this.lookup1.Properties.ShowLines = false; this.lookup1.Properties.ShowPopupShadow = false; this.lookup1.ItemIndex = 0; } } </code></pre> <p>This shows the following:</p> <pre><code>Output Test 1 Test2 2 </code></pre> <p>I need Output as '1'<br> 'Test' has to be hide.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload