I'm using Visual Studio 2012, vb.net with DevExpress 10.2 version controls. I have a LookUpEdit control where I'm setting the value in the code. This works fine and I'm able to get the EditValue of the control. However, I'd like the control to not be visible to the user. When I make the LookUpEdit control not visible, the EditValue is always 0. My guess is that making is not visible makes the EditValue not get populated. How can I set the EditValue and retain it if the LookupUpControl is not visible?
Here's the setup of the LookUpEdit Control:
Me.cbCreditReason = New DevExpress.XtraEditors.LookUpEdit()
Me.cbCreditReason.Enabled = False
Me.cbCreditReason.Location = New System.Drawing.Point(238, 32)
Me.cbCreditReason.Name = "cbCreditReason"
Me.cbCreditReason.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
Me.cbCreditReason.Size = New System.Drawing.Size(229, 20)
Me.cbCreditReason.TabIndex = 1
Here's what it looks like:
Here's how I'm setting the value:
cbCreditReason.Text = clickedButton.Text
When I look at the EditValue later in the code, it displays the correct value:
Now if I make the control not visible:
Me.cbCreditReason.Visible = False
The EditValue changes to 0: