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.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

101237 Oct 10,2011 04:13 AM Oct 14,2011 09:01 AM WPF 1
loading
Tags: GridControl
Lukas Reusch
Asked On October 10, 2011 04:13 AM

Hello,

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 09:01 AM

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.

Thanks,
Rajasekar



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.

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.

;