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
800
XamDataCards & Infragistics.Controls.Editors.XamComboEditor
posted

Within a XamDataCards control via xaml I can add a Infragistics.Controls.Editors.XamComboEditor like so...

<dataPresenter:XamDataCards Name="dataCards" Theme="Aero">

<ig:XamComboEditor Name="xamComboEditor1"
VerticalAlignment="Top"
AllowMultipleSelection="True"
CheckBoxVisibility="Visible"
DisplayMemberPath="LastName"
ItemsSource="{Binding}" />
</dataPresenter:XamDataCards>

But I cannot add it as a field via the field layouts, it results in a runtime exception of "FieldSettings.EditorType's must be set to a type that derives from ValueEditor\r\nParameter name: EditorType"...

<dataPresenter:XamDataCards Name="dataCards" Theme="Aero">
<dataPresenter:FieldLayout>
<dataPresenter:FieldLayout.Fields>
<dataPresenter:UnboundField Name="xamComboEditor1">
<dataPresenter:Field.Settings>
<dataPresenter:FieldSettings EditorType="{x:Type editors:XamComboEditor}">
<dataPresenter:FieldSettings.EditorStyle>
<Style TargetType="{x:Type editors:XamComboEditor}">
<Setter Property="ItemsSource" Value="{Binding}" />
<Setter Property="DisplayMemberPath" Value="LastName" />
<Setter Property="CheckBoxVisibility" Value="Visible" />
<Setter Property="AllowMultipleSelection" Value="True" />
<Setter Property="VerticalAlignment" Value="Top" />
</Style>
</dataPresenter:FieldSettings.EditorStyle>
</dataPresenter:FieldSettings>
</dataPresenter:Field.Settings>
</dataPresenter:UnboundField>
</dataPresenter:FieldLayout.Fields>
</dataPresenter:FieldLayout>
</dataPresenter:XamDataCards>

Is there any way to make this possible or a work around to allow the editor to be added via the field layouts?

Thank you,

Jonathan

Parents
No Data
Reply
  • 34810
    Offline posted

    Hello Jonathan,

    The issue here is that you are using a Shared XAML reference rather than the WPF Specific one.

    With all DataPresenter family controls, you need to use the WPF Specific editors.

    Your code is correct, but the reference you are using is Infragistics.Controls.Editors.XamComboEditors, which is the Shared XAML reference.

    The one you really need is the one that reads Infragistics.Editors.

    Please let me know if you have any questions or concerns.

    Sincerely,
    Andrew
    Developer Support I
    Infragistics Inc.
    www.infragistics.com/support

Children