I get the following exception when setting the XamDataGrid Field EditorType to the Infragistics.Controls.Editors.XamComboEditor. I'm using v11.2 and I need the MultiSelection and ComboBox support in the Infragistics.Controls.Editors.XamComboEditor (AllowMultipleSelectionProperty & CheckBoxVisibilityProperty) in a cell in my XamDataGrid.
The exception seems self-explanatory - the Infragistics.Controls.Editors.XamComboEditor does not derive from ValueEditor while Infragistics.Windows.Editors.XamComboEditor does but how do I achieve MultiSelection and ComboBox in a dropdown in my XamDataGrid which the Infragistics.Controls.Editors.XamComboEditor supports?
What is the rationale behind having these 2 different XamComboEditors?
Thanks,
Vikrant
================================
igField_.Settings.EditorType =
typeof(XamComboEditor);
Throws this exception:
Exception='System.ArgumentException: FieldSettings.EditorType's must be set to a type that derives from ValueEditor
Parameter name: EditorType
at Infragistics.Windows.DataPresenter.FieldSettings.ValidateEditorType(Object value)
at System.Windows.DependencyProperty.IsValidValue(Object value)
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
Hi,
Any help / pointers on this query?
Hello Vikrant,
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
Hello Rachita,
You can set the XamComboEditor's DropDownButtonDisplayMode Proeprty to OnlyInEditMode. This way the dropdown button will be shown only when the Editor is in edit mode.
Hope this helps you.
I have a Infragistics XamDataGrid and i have a field where i have put XamComboeditor as the EditorStyle.I have the AllowEdit property of the field bound to a boolean flag that is set to true when edit button is pressed and set to false when update button is pressed.
The Problem is some of the rows still show the XamComboeditor even if the update button has been pressed. This should not happen as the per the logic specified above.
Please advice on this.
Hello,
I apologize for the late reply. First you should change the LastName and ID Properties to be of ObservableCollection<T> type and you can either handle the XamComboEditors’ SelectionChnaged event and add the newly selected item to the underlying object’s Property because the XamComboEditor’s SelectedItems collection is read only and it cannot be bound.
Thanks Stefan.
How should I bind this selecteditems(single/multiple selected items) now? for eg, I need the values Last name and ID reflected back in the Person class obj.
Hello Poornima,
I have been looking into your requirement and I modified the sample I sent you before and now it works as you want. The XamComboEditor in the second Field doesn’t have any Items until you select some item in the corresponding XamComboEditor in the first Field.