This project has moved and is read-only. For the latest updates, please go here.

DataGrid Cell TextWrapping doesn't work

Sep 17, 2013 at 1:46 PM
I am using DataGrid (Community Edition). I want to have a column with wrapped text in header and cells. I used this code to create column in XAML:
<xcdg:Column FieldName="MyCol" Title="MyCol" Width="100" TextWrapping="Wrap"/>
Text wraps in header, but not in cells. What am I doing wrong?
Sep 17, 2013 at 6:37 PM

"TextWrapping="Wrap"" is the good property to use on Column to wrap text.
To work on DataRows, you have to make sure the DataRows have a big height, to be able to fit more than one line of text.
To modify the DataRows height, you can use
        <xcdg:TableflowView ContainerHeight="50"/>
Sep 18, 2013 at 2:26 AM
Thanks for your answer.

I figured out that TextWrapping doesn't work if TextTrimming is set to default.
Is it possible for rows to have different "auto" height according to the contents like in standard Microsoft DataGrid?
Sep 18, 2013 at 2:54 PM

If you want to have "auto" Height for the rows in the DataGrid, use the "TableView" instead of the "TableflowView".
Sep 19, 2013 at 2:43 AM
Great! Thanks.
Where can I read such stuff? Is DataGrid well-documented?
Sep 19, 2013 at 6:29 PM

You can find the documentation for all Xceed product's here :

Please note that for the Xceed WPF DataGrid included in the toolkit, it is not the full version, so some features could not be available.