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
315
UltraComboEditor slow when item not in list
posted
When using an UltraComboEditor as a editor for a cell in an ultragrid the ultracomboeditor performs really slow when an entry is entered that is not in the least. For example in the sample application enter "mike" and it becomes almost unusable. Try hitting the dropdown when an entry is made that isn't in the list the grid pretty much hangs for several seconds. I'm guessing it's because when an item isn't in the list the control is trying to stash a string into the behind the scenes ID (Long?) column of the data cell rather than inserting a null value as the item isn't in the list? Is there a way around this? I've attached a sample. Maybe I'm doing something wrong. I can't see what though, this should be possible without the lag as it is quite common for people to type invalid entries in. We can validate that, it's the lag issue that is of concern. This has been happening over the last several versions, but I've just tested it in the latest 14.2 release of Win Forms and the problem persists.
WindowsFormsApplication2.zip
Parents
No Data
Reply
  • 21795
    Offline posted

    Hello Streven,

    Thank you for posting in our forum.

    When you have an UltraGridCell with UltraComboEditor as an editor and enter in the cell a text not presenting in the UltraComboEditor’s items here is what happens:

       1. As you set the AutoCompleteMode to SuggestAppend on each keystroke end user enters the editor is trying to find a list item that matches the user input.

       2. If the editor does not succeed to find such item it tries to cast the input to the ValueMember type.

       3. If casting is unsuccessful the editor throws an exception which is then caught and operated by the grid.

    Please note the process of throwing, catching and processing an exception however is slow. This is why you experience this behavior. More about UltraGrid performance you may find by following the next link http://ko.infragistics.com/community/forums/t/15306.aspx

    Like a work around you may use a data source where ValueMember and DisplayMember are of same data type. Then steps two and three from above will note happened. More about UltraComboEditor Value property you may find by following the next link http://help.infragistics.com/Help/Doc/WinForms/2014.2/CLR4.0/html/Infragistics4.Win.UltraWinEditors.v14.2~Infragistics.Win.UltraWinEditors.UltraComboEditor~Value.html

    Please find attached your revised sample with UltraComboEditor’s ValueMember and DisplayMember both set to type of string.

    Please let me know if you have any further questions.

    CAS-150622-Q3L1R3.zip
Children