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
595
xamDataGrid AutoFit + ExtendLastField + TextWrapping
posted

Hi all, I'm trying to create a xamDataGrid where the last field is extended, and also allows for text in the field to wrap. Using the code below, the last field is extended to fit all available space, but when typing in the last field, the size of the grid is increased (and a horizontal scrollbar appears), rather than the cell in the text being wrapped and continuing on a new row (which is what I want to happen). Is this possible to accomplish?

<igDP:XamDataGrid AutoFit="True">

<igDP:XamDataGrid.FieldSettings>

<igDP:FieldSettings Width="Auto" AutoSizeOptions="All"/>

</igDP:XamDataGrid.FieldSettings>

 

<igDP:XamDataGrid.FieldLayoutSettings>

<igDP:FieldLayoutSettings AddNewRecordLocation="OnTopFixed"

AllowAddNew="True" AutoFitMode="ExtendLastField"/>

</igDP:XamDataGrid.FieldLayoutSettings>

<igDP:XamDataGrid.FieldLayouts>

<igDP:FieldLayout>

               <igDP:Field Name="Task" Label="Task"/>

                        <igDP:Field Name="Date" Label="Date"/>

                        <igDP:Field Name="Comment" Label="Comment">

                        <igDP:Field.Settings>

<igDP:FieldSettings>

<igDP:FieldSettings.EditorStyle>

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

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

</Style>

</igDP:FieldSettings.EditorStyle>

</igDP:FieldSettings>

</igDP:Field.Settings>

</igDP:Field>

</igDP:FieldLayout>

</igDP:XamDataGrid.FieldLayouts>

</igDP:XamDataGrid>