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
AutoSize rows

I have a XamDataGrid that is being populated by a DataTable (the columns are auto-generated). I have some cells that are multi-line and need to have the rows automatically size the rows to fit the entire contents of those cells (some of the contents can have upto 20 lines give or take).


I have attempted to search the forums but I am only finding threads that are relating to auto-sizing the columns and not the rows.

Here is the settings that I am currently using:

        <igDP:FieldLayoutSettings AllowAddNew="False" 
                                  HeaderPrefixAreaDisplayMode="FieldChooserButton" />
        <igDP:FieldSettings AllowRecordFiltering="true" 
                            Width="Auto" />

Thank you for any help that you can provide!

  • 27093



    I have been looking in your issue and have found a way for you to achieve this. Basically the trick is to make the XamEditors to wrap their contents and set the DataRecordSizingMode property. Here is xaml snippet you can test out a screenshot of it in action:


    <igDP:XamDataGrid x:Name="xamDataGrid1" BindToSampleData="True" Grid.Row="1"   >


            <Style TargetType="{x:Type igEditors:XamTextEditor}">

                <Setter Property="TextWrapping" Value="Wrap"/>




            <igDP:FieldLayoutSettings DataRecordSizingMode="SizedToContentAndIndividuallySizable"/>




    Please let me know if you require any further assistance on the matter.



    Petar Monov

    Developer Support Engineer

    Infragistics Bulgaria