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
30
XamGrid GroupColumn Header Text Wrapping
posted

Hi,

I have created Grouping header using XamGrid in WPF. The code is like below:-

<GroupColumn key="grp1" HeaderText="Commitment Amount TS in USD/Local Currency with xy Factor ON>

 <GroupColumn.Columns>

       <Few TemplateColumns>

</GroupColumns.Columns>

</GroupColumn>

Now in my WPF screen when i resize this group column the text gets trimmer however it is not wrapped. I want to wrap the GroupHeader text.

Note - the question is on GroupHeader text and not on template column textblock to text header wrapping. I know this can be wrapped using textwrap.. property.

  • 1480
    Offline posted

    Hello Sagar,

    Thank you for reaching out.

    HeaderText is an exposed property when you would like to quickly set it up without setting further properties. If you would like to wrap it or apply formatting, you can use HeaderTemplate instead, which will overwrite the HeaderText property:

    <ig:GroupColumn.HeaderTemplate>
        <DataTemplate>
                <TextBlock Text="{Binding}" TextWrapping="Wrap"/>
        </DataTemplate>
    </ig:GroupColumn.HeaderTemplate>

    Furthermore, XamGrid is planned for retirement, so I would suggest checking XamDataGrid instead:

    https://www.infragistics.com/help/wpf/xamdatagrid

    Sincerely,
    Tihomir Tonev
    Associate Software Developer
    Infragistics