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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Cut the text in a row this way TE...XT instead of TEXT...

Thread ID:





101237 Oct 10,2011 08:13 AM UTC Oct 14,2011 01:01 PM UTC WPF 1
Tags: GridControl
Lukas Reusch
Asked On October 10, 2011 08:13 AM UTC


i want to cut a text in a row of an datagrid, which is to long for the column, in the middle of the text.

For example: LONGTEXT

At the moment: LONGTE...

I want: LON...EXT

The width of the column is changeable.

Rajasekar [Syncfusion]
Replied On October 14, 2011 01:01 PM UTC

Hi Peter,

Sorry for the inconvenience, we are able to understand your requirement, you are trying to cut the mid chars of the cell value instead of last chars. But, you cannot achieve this requirement.

But, you can able to show the whole cell value even after the value changes to long text, by using ResizeColumnToFit method like below,

Code Snippet[C#]

this.dataGrid.CurrentCellEditingComplete += new Syncfusion.Windows.ComponentModel.GridRoutedEventHandler(dataGrid_CurrentCellEditingComplete);

void dataGrid_CurrentCellEditingComplete(object sender, Syncfusion.Windows.ComponentModel.SyncfusionRoutedEventArgs args)
this.dataGrid.Model.ResizeColumnsToFit(GridRangeInfo.Table(), GridResizeToFitOptions.NoShrinkSize);

Please let us know if you have any queries.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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