Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
How to use AutoCompleteMode in UltraComboEditor?
posted

Hello,

I have implemented AutoCompleteMode using UltraComboEditor. I want two functionalities concerned with the AutoCompleteMode. I’ve attached my source codes (UltraComboEditor.zip).

In the initial execution screen of my source codes, I have total 9 columns and I can dynamically generate each row by using ‘SetList’ or ‘AddLine’ button. 

In Opcode lines, after adding rows, I have implemented UltraComboEditor to perform AutoCompleteMode. As I mentioned, I want two functionalities. One of which is that I want to show all items in a list that have some words for AutoCompleteMode when I focus on the ‘Opcode’ column without any input character. Second one is that I want autocomplete of words in my list for any prefix characters. For example, I have a list composed to ‘abc’, ‘abs’, ‘sabs’, ‘bcs’, and ‘bbs’. In this situation, if I give the character ‘a’ as input, then the combo box automatically shows ‘abc’, ‘abs’, and ‘sabs’. And if I give two characters ‘bc’, then the combo box automatically shows ‘abc’ and ‘bcs’. In my source codes, These kinds of functionalities are not run. I’ve written the code “combo.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;” at line 197 in Form1.cs.

Please let me know how to modify my codes to run above two functionalities.

Thanks in advance.

UltraComboEditor.zip
Parents
  • 21795
    Verified Answer
    Offline posted

    Hello Sang-Min,

    Thank you for posting in our forum.

    1. If I understand you correctly you need the combo of the cell to dropdown automatically when the cell is on focus, or more specifically when the cell enters in edit mode. If this is what you need you may handle AfterEnterEditMode event of the grid. In the event handler you can set DroppedDown of the active cell to true – this will drop down the combo.

    2. In order to achieve filtering of the values in the dropdown as well as auto complete you need to set AutoSuggestFilterMode and AutoCompleteMode properties of the grid column and not of the UltraComboEditor. Actually the grid’s cell use the UltraComboEditor’s editor when in edit mode. It is not use the control, so any properties you set on the control will be overridden by the grid column.

    In the attached archive you may find updated version of your sample. Please check it and let me know if you need any further assistance on this.

    Please check also the following link to find out the best practices for placing a drop down in UltraGrid cell http://blogs.infragistics.com/winforms/wiki/best-practices-for-placing-a-dropdown-or-combo-in-an-wingrid-cell/5.aspx

    CAS-155563-H9W2B7.zip
Reply Children
No Data