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 EventName="RecordsDeleting" SourceName="VariableGrid">
<ei:CallMethodAction MethodName="DeletingVariables" TargetObject="{StaticResource variableGridViewModel}"/>
<i:EventTrigger EventName="RecordsDeleted" SourceName="VariableGrid">
<ei:CallMethodAction MethodName="VariablesDeleted" TargetObject="{StaticResource variableGridViewModel}"/>
<i:EventTrigger EventName="MouseEnter" SourceName="VariableGrid">
<ei:CallMethodAction MethodName="SetActiveVariable" TargetObject="{StaticResource variableGridViewModel}"/>
</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>
</igDP:FieldSettings.EditorStyle>
</igDP:FieldSettings>
</igDP:Field.Settings>
</igDP:Field>
<igDP:Field Name="ServerVarType" Label="Type">
<igDP:FieldSettings CellContentAlignment="LabelAboveValueAlignRight"
EditorStyle ="{StaticResource CustomTextEditorStyle}" />
<igDP:Field Name="ServerDisplayUnits" Label="Display Units">
<igDP:Field Name="ServerDefaultValue" Label="Default Value">
<igDP:Field Name="ServerProcess" Label="Process">
<igDP:Field.Settings >
<igDP:FieldSettings EditorType="{x:Type igEditors:XamComboEditor}"
EditorStyle="{StaticResource CustomComboEditorStyle}" />
</igDP:FieldLayout>
</igDP:XamDataGrid.FieldLayouts>
</igDP:XamDataGrid>
Hello,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
hi,
Thank you for your support we are managed our requirement.
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
I have modified sample is sent before, so now it uses DataTable as DataSource. If it doesn’t satisfies all your needs feel free to modify it, so it reproduces your behavior and send it back to me for further investigation.
Hi,
please provide one sample by placing BindTosampleData=False to achieve column freezing.
igDP:XamDataGrid BindToSampleData="False" Name="xamDataGrid1" VerticalAlignment="Top"