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.
Thanks Milko,
The problem with using the same value type is then back end binding issues with the entity classes. Will have to make temporary holding fields and such like.
The other issue is cross contamination, say for instance the behind the scenes "Long ID" is 158, but the product code for a product is also 158 but it's behind the scenes value is 190. I guess a not in list check could probably cater for this but it makes things more complicated.
Is it possible not to have the editor cast to the value member type when something is entered that isn't in the list. Simply return null? Maybe an option on the control to allow this. I.E. Cast null to value member when item not in list. That would solve the problem.We typically inherit and build custom controls based on the Infragistics one. Is there an override I can put on the control to do this? I tried overriding the value {get;set;} but that doesn't seem to trigger.