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
245
Width = "Auto" and resize="true"
posted

In the xamDataGrid, I have the column size set to Auto, and resize set to true. I was hoping that when the form opened up, it would set the size via the Auto alogrithm, and then allow the user to move where the column edges are.

I can only get the column to move when I have the width not set to auto.

 

So, how does one go about getting the default to be auto, and allowing the user to grab a column and dynmically changing the width?

Parents
  • 9836
    posted

    I've tested this behavior in a sample project and it looks fine to me with the following settings:

    <igDP:XamDataGrid x:Name="xamDataGrid1">  

                <igDP:XamDataGrid.FieldLayoutSettings>

                    <igDP:FieldLayoutSettings AutoGenerateFields="False"/>

                </igDP:XamDataGrid.FieldLayoutSettings>     

                <igDP:XamDataGrid.FieldSettings>

                    <igDP:FieldSettings AllowResize="True"/>

                </igDP:XamDataGrid.FieldSettings>

                <igDP:XamDataGrid.FieldLayouts>

                    <igDP:FieldLayout>

                        <igDP:FieldLayout.Fields>

                            <igDP:Field Name="String" Width="Auto"/>

                            <igDP:Field Name="Integer" Width="Auto"/>

                            <igDP:Field Name="Double" Width="Auto"/>

                            <igDP:Field Name="Decimal" Width="Auto"/>

                        </igDP:FieldLayout.Fields>

                    </igDP:FieldLayout>

                </igDP:XamDataGrid.FieldLayouts>

    </igDP:XamDataGrid>

    By setting AllowResize to true and the width to Auto for all of the fields in the grid, I'm able to resize and move the fields.

    Could you attach a sample that duplicates the issue or code snippet on the grid so I can look at it? Also which version and build are you using in your application?

Reply Children