I am trying to use the AutoComplete functionality of an UltraCombo to match against the text typed using AutoSuggestFilterMode.Contains and AutoCompleteMode.SuggestAppend.
What I want to happen is, when the user is typing and the filtered dropdown list contains only one row to match against, set the row to the selectedrow of the UltraCombo.
I tried checking the count of the FilteredInNonGroupByRows to make sure it is 1, then setting the SelectedRow to that row using Rows.GetFilteredInNonGroupByRows(0).
This works for text typed that is contained within the string of the associated row (i.e. "ai" gives me "Claim" and it selects "Claim") but not for text typed that is the prefix in the string of the associated row (i.e. "cl" gives me "Claim" but it does NOT select "Claim")
Is there a way to do this?
Thanks Boris,
It is working the way I have it now. I was just curious if I was missing out on some features or functionality of the UltraCombo or other Infragistics controls. I didn't want to implement the work-around fix if there was an easier way to do it using UltraCombo properties. Thanks for the help, though, I really appreciate it!
Hello Joshua,
It seems to me that your solution is working. I do not see any visual representation of the selected row when you type "Cl" or "ai", but it looks like the row is selected. You could verify that by putting the following code and observe the behavior then:
ugRow.Activated = True
Please do not hesitate to contact me if you need any additional assistance.
Well, I started out trying to use the built in filtering and autocomplete functionality. However, it wasn't doing what I wanted. It would only suggestappend if the user type the prefix of the string representing a row in the UltraCombo (i.e. typing "cl" would suggestappend "aim" for "claim").
I wanted it to do that, but also be able to suggestappend based on text typed that matched text contained within the string representing a row (i.e. "ai" would suggestappend "cl" and "m" for "claim"). It sounds bizarre, but it would be useful it situations where an option starts with a numerical value then is followed by a string such as "000-String". I want the user to be able to type "str" and match against "string".
The sample provided is what I was attempting to use as a workaround for this functionality using the text changed event and the FilteredInNonGroupByRows collection. I provided the full VS2010 solution, but the sample code is in Test1.vb.
When are you doing this? At the end I got confused and do not know if you are really using the filtering functionality our just the filter and autocomplete modes.
Could you please provide a small sample project if possible with your scenario, as I feel that I did not get you right on this matter.