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
XamDataGrid disable columns AutoFit


How to disable columns AutoFit?

Many thanks

  • 33240
    Offline posted

    Hello Zed Zed,

    I apologize for the delay in response to this thread.

    In order to prevent the column auto-fit, you can set the DefaultColumnWidth and/or DefaultColumnMinWidth properties of the XamDataGrid. At the time of writing this, the DefaultColumnWidth takes a ColumnWidth object, and so to set this, you can use the following XAML:

    <ig:XamDataGrid ItemsSource="{Binding Data}">
          <ig:ColumnWidth Value="200" />

    Please note that you can also set the Width properties of the columns that you define if you are manually generating them.

    Please let me know if you have any other questions or concerns on this matter.