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
20
XamDataGrid Height of field doe not resize when changing the TextWrapping
posted

Hi

I have a field in my grid where the TextWrapping is binded to a property of my DataRecord. When I change the value of the TextWrapping, The height of the cell is not resized to view all the lines.

The new TextWrapping is properly applied because if I manually resize the height of the item, I see multiple lines.

what Am I missing?

                        <igDP:Field Name="Service" Label="Service Description" Width="500">
                            <igDP:Field.Settings>
                                <igDP:FieldSettings LabelTextAlignment="Left" AllowEdit="False">
                                    <igDP:FieldSettings.EditorStyle>
                                        <Style TargetType="{x:Type igEditors:XamTextEditor}">
                                            <Setter Property="TextWrapping" Value="{Binding DataItem.TextWrapping}" />
                                        </Style>
                                    </igDP:FieldSettings.EditorStyle>
                                </igDP:FieldSettings>
                            </igDP:Field.Settings>
                        </igDP:Field>
Parents
  • 26105
    Offline posted

    Hello Marc, 

    Please try the following. Set DataRecordSizingMode to SizedToContentAndIndividuallySizable

    <igDP:XamDataGrid>
            <igDP:XamDataGrid.FieldLayoutSettings>
                    <igDP:FieldLayoutSettings
                      DataRecordSizingMode="SizedToContentAndIndividuallySizable"/>
            </igDP:XamDataGrid.FieldLayoutSettings>
    </igDP:XamDataGrid>

    Your best bet would also be toggling cell virtualization via AllowCellVirtualization to help with this as well. This is also demonstrated in the link above.

    Let me know if you have any questions.  

Reply Children