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
94
FieldLayout - ResourceDictionary
posted

Hi,

is it possible to define a FieldLayout in a ResourceDictionary (own XAML and directory) ?

FieldSetting and FieldLayoutSettings work well.

 

Resourcedictionary.xaml

<igDP:FieldSettings x:Key="Settings1"
                                     AllowEdit="False"
                                     AllowGroupBy="False"
                                     AllowRecordFiltering="True"
                                     CellClickAction="EnterEditModeIfAllowed" />


    <igDP:FieldLayoutSettings  x:Key="Settings2"
                                                      AllowAddNew="False"
                                                      AllowDelete="False"
                                                      AllowRecordFixing="Top"
                                                      AutoFitMode="Always"
                                                      HighlightAlternateRecords="True" />

 

MainWindow.xaml

<igDP:XamDataGrid x:Name="xamDataGrid" FieldLayoutSettings="{DynamicResource Settings2}" FieldSettings="{DynamicResource Settings1}" />

 

But how i will get a FieldLayout to work like this:

    <igDP:FieldLayout  x:Key="FieldLayout1">
        <igDP:FieldLayout.Fields>
            <igDP:Field Name="name" />
            <igDP:Field Name="department" />
            <igDP:Field Name="salary" />
            <igDP:Field Name="email" />
        </igDP:FieldLayout.Fields>
    </igDP:FieldLayout>

Thanks in advanced.

 

Edit. DataSource is bind programmaticly on ClickEvent in Code behind (VB.net)

Parents Reply Children