Hi,
I have run into a very strange problem in connection with the XamDataGrid and Editors.I have used Volume 8.1 controls in my WPF projects and the editing mode has worked properly.But I have downloaded the new 8.2 version and now the Edit mode's events don't occur.I set the cell's EditorType and EditorStyle properties and change the field's CellClickAction property to 'EnterEditModeIfAllowed',the Cell is activated but the editing is not start.That code worked with the 8.1 dlls.
Have you any idea what I do wrong? I want to use the new features but I need reinstall the previous version.Could anybody help me, please?
Regards,atus
Hi Andrew,
thank you for your answer and your kind help. It works now so we can use the v8.2 controls. :)
Best regards,atus
I'm sorry for the trouble this caused. It looks like this was a regression issue introduced into the release. When the EditorType of the Field was left to null, the cell would not enter edit mode even though the Cell's EditorType was set. This will be addressed in the next hotfix. For now, you can work around this by explicitly setting the EditorType of the field to an editor. E.g.
e.FieldLayout.Fields["PropertyValue"].Settings.EditorType = typeof(Infragistics.Windows.Editors.XamTextEditor);
thank you for taking time to try to help me. I have created a very simple sample and I have attached it. That code works with the 8.1 toolset.
// set a very simple datasourcexamDataGrid1.DataSource = bllSource;}
e.FieldLayout.Fields["PropertyValue"].Settings.AllowEdit = true;e.FieldLayout.Fields["PropertyValue"].Settings.CellClickAction = CellClickAction.EnterEditModeIfAllowed;}
DataRecord dataRecord = e.Record as DataRecord;if (dataRecord != null){if (dataRecord.Cells["PropertyValue"].Value.GetType().Name == "String"){//set the string handler editor for the grid's second fielddataRecord.Cells["PropertyValue"].EditorType = typeof(StringHandlerEditor);dataRecord.Cells["PropertyValue"].EditorStyle = new Style(typeof(StringHandlerEditor));}else{//set the boolean handler editor for the grid's second fielddataRecord.Cells["PropertyValue"].EditorType = typeof(BooleanHandlerEditor);dataRecord.Cells["PropertyValue"].EditorStyle = new Style(typeof(BooleanHandlerEditor));}}}
private void xamDataGrid1_EditModeStarting(object sender, EditModeStartingEventArgs e){// this event only occurs with the 8.1 dlls}
The StringHandlerEditor and BooleanHandlerEditor types are only CustomControls. The styles of them contain Template and EditTemplate Setters too. These classes:
public class TypeHandlerEditorBase : ValueEditorpublic class StringHandlerEditor : TypeHandlerEditorBasepublic class BooleanHandlerEditor : TypeHandlerEditorBase
I only use 3 dlls:Infragistics3.Wpf.DataPresenter.v8.2.dllInfragistics3.Wpf.Editors.v8.2.dllInfragistics3.Wpf.v8.2.dll
Can you post a small sample so we can see the behavior?