Hi Ivan,
Thanks for the suggestion but in my case, I am not trying to save yet so I cannot trigger your code to move the focus of the control. I have code in the EditValueChanged which uses the BO field that is binded to the control, and of course it is failing because something is not working with the IBusinessBindable.
In other words, when the EditValueChanged is trigger, the BO field property binded to the control is not updated with the EditValue property of the control. I have to add code like this below to overcome the situation:
Private Sub sleCustomerNameLookup_EditValueChanged(sender
As System.
Object, e
As System.
EventArgs)
Handles sleCustomerNameLookup.EditValueChanged
'-- Binding is not working properly, so we need to make sure the BO field gets its value updated.
If Me.BizTransactionItems1.Count > 0 AndAlso Not String.IsNullOrEmpty(Me.sleCustomerNameLookup.EditValue) Then
If Me.BizTransactionItems1.QBCustomerRefID <> Me.sleCustomerNameLookup.EditValue Then
Me.BizTransactionItems1.QBCustomerRefID = Me.sleCustomerNameLookup.EditValue
End If
End If
End Sub
I was under the assumption that implementing the IBusinessBindable would take care of updating the BO field property as it is done for the SF controls and other DevExpress like the EditText which works fine, so I believe there must be something different with this control "SearchLookupEdit" which is not respecting the binded field property. Only thing different I can think of is that this controls uses a BusinessBindingSource as the source of the internal grid and the others don't.
This DevExpress SearchLookupEdit control is very, very useful for replacing the traditional SF combobox and has the ability to show a popup with as many columns as you want and more important the companion textbox is able to search on all the columns you defined as searchable, so the end user can simply start typing for any value and whatever is found would be highlighted and the grid will be filtered with only those records.
Edhy Rijo