We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Essential GridControl WPF - cell text wrap

Thread ID:





100943 Sep 14,2011 02:19 PM Sep 20,2011 02:07 PM ASP.NET Web Forms (Classic) 4
Tags: GridGroupingControl
Namita Jain
Asked On September 14, 2011 02:19 PM

I am using the GridDataControl for WPF. it's a basic grid having a few columns. How can i wrap the text in teh cell? I have tried all the options i could fine but in vain.

I am using somethign like

Please suggest.


Namita Jain
Replied On September 15, 2011 09:52 AM

Any updates?
Can you point me to the GridDataControl for WPF documentation defining the various properties defined on controls?


Jawahar Jeevanandan J [Syncfusion]
Replied On September 16, 2011 11:24 AM

Hi Namita,

Thanks for using syncfusion products.

We have analyzed on your requirements and this can be acheived by using the following codes.

Code snippet [XAML]

//The below code helps us to see the text wrapping in the cell
Code snippet [C#]:

this.grid.Loaded += new RoutedEventHandler(grid_Loaded);

void grid_Loaded(object sender, RoutedEventArgs e)
// Resizing the row size to show text in mutiple lines.
this.grid.Model.ResizeRowsToFit(GridRangeInfo.Table(), GridResizeToFitOptions.NoShrinkSize);

We have prepared a sample based on this and you can find the sample under the following location.

Sample: http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=CS1762698222.zip

Please let us know if this helps you.


Namita Jain
Replied On September 19, 2011 02:28 PM

Thanks, your sample works.
But guess the property on the Grid is not intuitive. What does the TextWrapping property do in the xaml file then?

Jawahar Jeevanandan J [Syncfusion]
Replied On September 20, 2011 02:07 PM

Hi Namita,

Thanks for your update.

The TextWrapping property wraps the complete text to the cell. To see the visual effects of the TextWrapping we have to use the method called ResizeRowsToFit. We have updated video snap shot regarding this. Please have a look on this and let us know if this helps you.




This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.