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
710
Column resizing
posted

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:Field.Settings>

<igDP:FieldSettings AllowEdit="False" AllowResize="True" CellMinWidth="160" LabelMinWidth="160" CellMaxWidth="500" LabelMaxWidth="500"/>

</igDP:Field.Settings>

</igDP:UnboundField>

<igDP:Field Name="Value3" Label="Value 3">

<igDP:Field.Settings>

<igDP:FieldSettings AllowEdit="True" AllowResize="True" CellMaxWidth="160" CellMinWidth="500" LabelMaxWidth="500" LabelMinWidth="160"/>

</igDP:Field.Settings>

</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 ?

Parents
  • 138253
    Offline posted

    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.

Reply Children