I used a ComboBoxBase control in DropDownList style with the GridListControl as the container for the Drop Down....anyways, this control works perfectly the way I was told we needed it, but like all clients, they have change the requirements....They now want to have the user be able to type to get to a particular code on the grid and have it be selected. My question to you is, how difficult is it to modify what I have to do that. My grid consists of two visual columns, one is a code (4 digits) and the other is a description. I want to have the user be able to type in the code to get to a particular item. I do not want to have the textbox portion of the combobox be editable (in other words, i don''t want the user to be able to actually type in the box and see what they are typing....only select from the list)
I looked at the examples from the 220.127.116.11 release and I couldn''t figure out an easy way to do this. I''m trying to avoid having to start over with this. Any help would be appreciated.
Also, would this be easier if I updated to the new version of syncfusion tools??
Thank you for your help.
ADAdministrator Syncfusion Team August 18, 2004 10:09 AM
Just installed the new version (couldn''t resist) and the new multicolumn combobox is nice....great work....i don''t mind moving my code to use this control, but it seems that I can''t have it go to items when you type in more than one char (ie if i press A it goes to the first item that starts with A, but if follow it with B it goes to the first item with B instead of AB), so i think I still have my problem....going to play around with this new control...see what this thing can do, but any help would be appreciated.
ADAdministrator Syncfusion Team August 18, 2004 03:24 PM
I have tested for this autocomplete behavior in the MultiColumnComboBox and it seems to be working as expected. Please refer to the test sample attached. Consider 2 names Malcom and Andy in the dropdown list. When "M" is entered into the MultiColumnComboBox, the row containing Malcom gets highlighted. When "a" is pressed after this, the row containing Malcom still stays highlighted (and not the row containing "Andy" even though "a" is typed in), and now the text in the MultiColumnComboBox is "Ma". Let me know if I have not understood your requirements correctly. Thanks for choosing Syncfusion.
ADAdministrator Syncfusion Team August 20, 2004 09:30 AM
Not what I would want, since the user can type in invalid, so I need the combobox to be in dropdownlist mode. I do think I did figure out how to do it (need to test it and make sure it doesn''t brake anything). I added the following code to the MultiColumn sample:
Dim str As String = ""
Dim myTime As DateTime = DateTime.Now
Private Sub multiColumnBoundCombo_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles multiColumnBoundCombo.KeyPress
If DateDiff(DateInterval.Second, myTime, Now) > 2 Then
str = ""
''If str.Length > 6 Then str = ""
str = str + e.KeyChar.ToString
If Not Me.multiColumnBoundCombo.ListBox.FindString(str) = ListBox.NoMatches Then
Me.multiColumnBoundCombo.SelectedIndex = Me.multiColumnBoundCombo.ListBox.FindString(str)
str = ""
myTime = DateTime.Now
I''m not sure if there is a more efficient way to do this or a better solution, but this seems to work.
Thanks for the help....
ADAdministrator Syncfusion Team August 23, 2004 04:16 PM
I do see this behavior when the DropDownStyle of the MultiColumnComboBox is set to DropDownList. But this is how the .NET ComboBox in DropDownList mode behaves too. Please refer to the modified sample attached here that demonstrates this. All our ComboBox controls are closely modelled on the .NET ComboBox and we have retained similar behavior for consistency purposes. For now, your workaround above seems to work. I will further investigate this and let you know if there is a better way to accomplish the same. We appreciate your continued interest in Syncfusion products.
ADAdministrator Syncfusion Team August 24, 2004 06:07 AM
After having further investigated this issue, I would like to inform you that the we rely heavily on the internal TextBox’s selection state in the "DropDown" style auto-completion logic implementation. So, there is no quick/easy way to internally implement the same logic in the "DropDownList" style auto-completion logic where there is no TextBox involved. Hence we have considered this as a feature request (QA# 536), and will try our very best to implement this feature at the earliest. We appreciate your continued interest in Syncfusion products.