Hi,
I have problem with resizing column when application is running.Example code from my window:
<igDP:XamDataGrid Name="someValues" Grid.Row="1" Theme="Onyx" Width="Auto" Background="{StaticResource GridEditorBrush}" ScrollingMode="Immediate" GroupByAreaLocation="None">
<igDP:XamDataGrid.FieldLayoutSettings>
<igDP:FieldLayoutSettings AllowDelete="False" AutoGenerateFields="False" RecordSelectorLocation="None" MaxSelectedRecords="1" MaxSelectedCells="0">
</igDP:FieldLayoutSettings>
</igDP:XamDataGrid.FieldLayoutSettings>
<igDP:XamDataGrid.FieldLayouts>
<igDP:FieldLayout>
<igDP:FieldLayout.Fields>
<igDP:UnboundField Name="Value1" Label="value 1">
<igDP:Field.Settings>
<igDP:FieldSettings AllowEdit="False" AllowResize="True" CellMinWidth="120" LabelMinWidth="120" LabelMaxWidth="500" CellMaxWidth="500"/>
</igDP:Field.Settings>
</igDP:UnboundField>
<igDP:UnboundField Name="Value2" Label="Value 2">
<igDP:FieldSettings AllowEdit="False" AllowResize="True" CellMinWidth="160" LabelMinWidth="160" CellMaxWidth="500" LabelMaxWidth="500"/>
<igDP:Field Name="Value3" Label="Value 3">
<igDP:FieldSettings AllowEdit="True" AllowResize="True" CellMaxWidth="160" CellMinWidth="500" LabelMaxWidth="500" LabelMinWidth="160"/>
</igDP:Field>
</igDP:FieldLayout.Fields>
</igDP:FieldLayout>
</igDP:XamDataGrid.FieldLayouts>
</igDP:XamDataGrid>
Important for user is to have possibility to increase and decrease columns width. Where can be a problem in this code ?
Hello PoKrec,
Thank you for your post. I have been looking through the code snippet you provided and I notice that in “Value3” Field you have set the cellmin and cellmax width like this:
CellMaxWidth="160"
CellMinWidth="500"
which causes your issue. To achieve your goal just swap the values and everything will work as expected.
If you have any further questions do not hesitate to ask.
Ok it was my mistake but I see that I can only decrease columns and what about increase?
I have some test project for you to test and see where can be a problem with this.