This project is read-only.

How to set text wrapping for columns?

Oct 10, 2013 at 7:53 AM

I've just come across your Extended Data Grid and I think it's great. I have a stupid question though - how do I set it to wrap text if the data in a particular cell extends beyond the width of the cell?

Is there a simple way to set it up so that the text will wrap and the row that the cell belongs to will automatically resize to accomodate the fact that the text appears on multiple lines?

I'm fairly new to this, so apologies if it's a bit of a stupid question!
Oct 10, 2013 at 7:29 PM
Hi ,

As this grid is derived from WPF toolkit datagrid, you can find solution for it internet.

You can use this strategy.

    <DataGridTextColumn Header="Wrapped & centered" Binding="{Binding field}">


Oct 13, 2013 at 3:24 PM
Hi bpoojary, thanks for the prompt reply!

I did find that solution previously, but initially thought that it wasn't working because the rows were not resizing, so it did not appear that the text was wrapping. I see now that the text is wrapping as expected, and my problem is getting the row to automatically size to the text.

It seems to work fine with the default WPF datagrid, but not with the extended datagrid. There must be a default setting somewhere that I'm missing - I'll keep playing around with it, and thanks again for your help!
Oct 13, 2013 at 7:16 PM

I fixed it, You can take latest (Change set 28037).
I had hard coded value of RowHeight in one of the style thats why it was not working properly.
It worked fine for me , try it at your end.

Oct 23, 2013 at 12:09 PM
Sorry for the late reply - that did fix the issue, thanks!