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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Essential GridControl WPF - cell text wrap

Thread ID:

Created:

Updated:

Platform:

Replies:

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

Hi
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.

Thanks



Namita Jain
Replied On September 15, 2011 01:52 PM UTC

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

Thanks
-Namita


Jawahar Jeevanandan J [Syncfusion]
Replied On September 16, 2011 03:24 PM UTC

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.

Thanks,
Jawahar.




Namita Jain
Replied On September 19, 2011 06:28 PM UTC

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 06:07 PM UTC

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.

Thanks,
Jawahar.





F100943_b033bddf.zip

CONFIRMATION

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.

Warning Icon 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.Close Icon

;