I think I have found a "bug".
I have a multicolumndropdown on a form.
The multicolumndropdown displays rows from a tabel with about 15000 rows in.
I have implemented "on demand loading" by using the KeyPress event of the combobox control like this:
Sub
cbCustomerSearchValue_KeyPress
If
Asc(e.KeyChar) = 13 Then
Retailers = Retailer.LoadRetailersByReference1(cbCustomerSearchValue.Text)
RetailerBindingSource.DataSource = Retailers
If Retailers.Count > 1 Then
cbCustomerSearchValue.MultiColumnComboBoxElement.ShowPopup()
ElseIf Retailers.Count = 1 Then
LoadCustomer(Retailers(0))
tabCustomerInformation.Focus()
End If
End if
End sub
When the user selects a row, I load the information about the customer like this:
Private Sub cbCustomerSearchValue_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cbCustomerSearchValue.SelectedValueChanged
If cbCustomerSearchValue.MultiColumnComboBoxElement.IsDroppedDown And cbCustomerSearchValue.SelectedItem IsNot Nothing Then
LoadCustomer(DirectCast(DirectCast(cbCustomerSearchValue.SelectedItem, Telerik.WinControls.UI.GridViewDataRowInfo).DataBoundItem, DataAccessLayer.Retailer))
End If
End Sub
If the search result in just one hit, I load that customer and display information about it.
Here comes my problem:
If the search resulted in more then one hit, I show the drop down list and the user can then select. (This is working)
The problem here is that even though the text inside the drop down box is not the same as the displaymember text on the first row, the first row in the grid is still selected.
Since the row is already selected, the selectedvaluechange event will not fire :(
Is there a way to detect when the actual user clicks on a row (and not when the databind occurs)?
Why is the first row selected when databinding occurs, can I disable this behavior?
In a normal dropdown control no row is selected until the user made it choose.
I think the multicolumndropdown should behave the same :)
Regards
Per