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
655
Xamdatagrid fixed fields
posted

Hi ,

we are using xamdatagrid we want ti fix the column we tried but its not working can you please look into the below code once and solve the problem

<igDP:XamDataGrid x:Name="VariableGrid" Margin="2,2,2,20" DataSource="{Binding Path=Model.Variables}"

                                                                                                       Background="{DynamicResource NgSDefaultBackground}">

                            <igDP:XamDataGrid.Resources>

                                <Style TargetType="{x:Type igEditors:XamNumericEditor}"  >

                                    <Setter Property="HorizontalAlignment" Value="Right" />

                                    <Setter Property="HorizontalContentAlignment" Value="Right" />

                                </Style>

                               

                                <local:VariableGridViewModel x:Key="variableGridViewModel" />

                            </igDP:XamDataGrid.Resources>

                            <i:Interaction.Triggers>

                                <i:EventTrigger EventName="EditModeStarted" SourceName="VariableGrid">

                                    <ei:CallMethodAction MethodName="GridEditModeStarted" TargetObject="{StaticResource variableGridViewModel}"/>

                                </i:EventTrigger>

                                <i:EventTrigger EventName="EditModeEnded" SourceName="VariableGrid">

                                    <ei:CallMethodAction MethodName="GridEditModeEnded" TargetObject="{StaticResource variableGridViewModel}"/>

                                </i:EventTrigger>

                                <i:EventTrigger EventName="RecordsDeleting" SourceName="VariableGrid">

                                    <ei:CallMethodAction MethodName="DeletingVariables" TargetObject="{StaticResource variableGridViewModel}"/>

                                </i:EventTrigger>

                                <i:EventTrigger EventName="RecordsDeleted" SourceName="VariableGrid">

                                    <ei:CallMethodAction MethodName="VariablesDeleted" TargetObject="{StaticResource variableGridViewModel}"/>

                                </i:EventTrigger>

                                <i:EventTrigger EventName="MouseEnter" SourceName="VariableGrid">

                                    <ei:CallMethodAction MethodName="SetActiveVariable" TargetObject="{StaticResource variableGridViewModel}"/>

                                </i:EventTrigger>

                            </i:Interaction.Triggers>

                            <igDP:XamDataGrid.FieldSettings>

                                <igDP:FieldSettings AllowEdit="True" Width="Auto" AllowFixing="NearOrFar" AutoSizeOptions="All" CellClickAction="SelectRecord"/>

                            </igDP:XamDataGrid.FieldSettings>

                            <igDP:XamDataGrid.FieldLayoutSettings>

                                <igDP:FieldLayoutSettings AutoGenerateFields="False" AutoFitMode="ExtendLastField" SelectionTypeRecord="Extended"/>

                            </igDP:XamDataGrid.FieldLayoutSettings>

                            <igDP:XamDataGrid.FieldLayouts >

                                <igDP:FieldLayout IsDefault="True" >

                                    <igDP:Field Name="Name" Label="Name" Width="Auto"  FixedLocation="FixedToNearEdge">

                                        <igDP:Field.Settings>

                                            <igDP:FieldSettings AllowFixing="NO">

                                                <igDP:FieldSettings.EditorStyle>

                                                    <Style TargetType="{x:Type igEditors:XamTextEditor}" BasedOn="{StaticResource TopBalloonDecorator}">

                                                        <Setter Property="Value">

                                                            <Setter.Value>

                                                                <Binding Path="DataItem.Name" UpdateSourceTrigger="PropertyChanged">

                                                                    <Binding.ValidationRules>

                                                                        <loc:RenameVariableValidationRule />

                                                                    </Binding.ValidationRules>

                                                                </Binding>

                                                            </Setter.Value>

                                                        </Setter>

                                                    </Style>

                                                </igDP:FieldSettings.EditorStyle>

                                            </igDP:FieldSettings>

                                        </igDP:Field.Settings>

                                    </igDP:Field>

 

                                    <igDP:Field Name="ServerVarType" Label="Type">

                                        <igDP:Field.Settings>

                                            <igDP:FieldSettings  CellContentAlignment="LabelAboveValueAlignRight"

                                                            EditorStyle ="{StaticResource CustomTextEditorStyle}" />

                                        </igDP:Field.Settings>

                                    </igDP:Field>

                                    <igDP:Field Name="ServerDisplayUnits" Label="Display Units">

                                        <igDP:Field.Settings>

                                            <igDP:FieldSettings  CellContentAlignment="LabelAboveValueAlignRight"

                                                            EditorStyle ="{StaticResource CustomTextEditorStyle}" />

                                        </igDP:Field.Settings>

                                    </igDP:Field>

                                    <igDP:Field Name="ServerDefaultValue" Label="Default Value">

                                        <igDP:Field.Settings>

                                            <igDP:FieldSettings  CellContentAlignment="LabelAboveValueAlignRight"

                                                            EditorStyle ="{StaticResource CustomTextEditorStyle}" />

                                        </igDP:Field.Settings>

                                    </igDP:Field>

                                    <igDP:Field Name="ServerProcess" Label="Process">

                                        <igDP:Field.Settings >

                                            <igDP:FieldSettings EditorType="{x:Type igEditors:XamComboEditor}" 

                                                                EditorStyle="{StaticResource CustomComboEditorStyle}" />

                                        </igDP:Field.Settings>

                                    </igDP:Field>

                                </igDP:FieldLayout>

                            </igDP:XamDataGrid.FieldLayouts>                       

                        </igDP:XamDataGrid>