Hi,
We have a grid which contains some editable XamComboEditors. I'm having trouble getting them to behave the same way as other fields in the grid. Currently, if the user hits enter on text fields, it acts to "commit" the record, firing the RecordUpdated event, which calls a Save method which posts everything back to the DB.
My issue is that enter on a XamComboEditor selects a drop down value when it's open, and appears to do nothing when it's closed. I don't want to automatically commit to the database whenever the user selects a value, but I do want to after they select something and hit enter on the closed box. I'm thinking the workflow would either be mouse select a value -> enter -> saved grid OR enter select a value -> enter again -> saved grid.
Suggestions welcome!
Hello Danielle,
Thank you for your response.
I have been looking into this issue with a simple sample project of my own, but I still cannot seem to reproduce this behavior you are seeing in the Infragistics 14.1.20141.2216 assemblies. In the sample project I have created, I simply use an EditorStyle in the Field that needs the XamComboEditor, as the issue seems to be coming from the RecordUpdated event firing while that EditorStyle is for a XamComboEditor in your case. In your case, this is influenced by an EditorStyleSelector, but that selector will be returning a style that is still used for the EditorStyle of the Field.
I have attached the sample project that I have used to test this. Please test this project on your machine, as the results may help to indicate the nature of this issue a bit further. In the case of this sample, I was not able to get the RecordUpdated event to fire until hitting the "Enter" key on the XamComboEditor. Please let me know if this is the same behavior you are seeing when running this project as well.
If, by chance, this project is not an accurate demonstration of what you are looking to do, please feel free to modify it and send it back so that it recreates this behavior that you are seeing.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support
Hi Andrew,
Apologies on the late reply. We are using Infragistics 14.1.20141.2216 assemblies and editors from Infragistics.Windows.Exditors (InfragisticsWPF4.Editors.v14.1).
The editors are placed in the XamDataGrids via the EditorStyleSelector property. The selector looks at a configuration object to determine which type of editor to use. The editor is then created based on a default style resource. We alter the ItemsSource, DisplayMemberPath, and ValuePath for XamComboEditors as necessary. In this particular grid, all other fields are read-only, the drop down is the only editable field. The user opens the drop down, selects a value, and hits enter. Enter is supposed to be triggering a XamDataGrid update, but the XamComboEditor seems to be absorbing the focus.
I can work on producing a sample, but the grid system is very dynamic.
Thanks,
Danielle
Just checking in, did you still require assistance on this matter?
Thank you for your post.
I have created a simple sample project that uses a XamDataGrid which handles the RecordUpdated event and has a ComboBoxField in it, but I can't seem to reproduce this behavior you are seeing. However, it is very possible that I am not placing the XamComboEditor in the grid in the same way that you are, and it is also possible that I'm not using the same XamComboEditor either, as there are two separate versions.
Would it be possible for you to please provide some more information on the exact type of XamComboEditor that you are using? Are you using the WPF Specific one (Infragistics.Windows.Editors.XamComboEditor), or the Shared XAML one (Infragistics.Controls.Editors.XamComboEditor). After that, could you please provide some more detail on how you are placing your XamComboEditor in your grid? Are you using a ComboBoxField, or possibly re-templating the CellValuePresenter? Also, would it be possible for you to include the version of Infragistics WPF that you are using? My initial tests were made using Infragistics WPF 2015.2 specific version 15.2.20152.1000. Is this the same assembly version you are using?