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.

Cell Data longerthan the Current Column width

Thread ID:

Created:

Updated:

Platform:

Replies:

52626 Dec 1,2006 01:31 AM Mar 4,2007 09:42 PM Windows Forms 2
loading
Tags: GridControl
Tannearu Hazarathaiah Gupta
Asked On December 1, 2006 01:31 AM

Hi,
I am using GridGroupping Control.

Where the text that a cell contains is longer than the current column width, that text should be truncated, so that only the left most portion is displayed; an ellipse should be shown to indicate that there is more text that is not being displayed; the full text should be shown as a ‘tool tip’ when that cell is hovered over.


Please resolve the problem asap.

Regards
Tannearu Hazarathaiah Gupta


Administrator [Syncfusion]
Replied On December 1, 2006 05:56 AM

Hi Tannearu,

The GridTextExtender class provides a "tooltip" text extender for a cell in a grid if the cell's text is longer than the cell width. Use a separate GridTextExtender class for each grid. Andalso you can use the Trimming property of the cell to indicate how text is trimmed when it exceeds the edges of the cell text rectangle. Please try the attached sample and let me know if you are looking something different.

//Code for string trimming
this.gridGroupingControl1.TableDescriptor.Appearance.AnyRecordFieldCell.Trimming = StringTrimming.EllipsisCharacter;

Here is a sample.
GGCCellDataTooltipTrim.zip

Best Regards,
Haneef

VoxCode
Replied On March 4, 2007 09:42 PM

Hi,

If you want the tooltip to be positioned exactly over the cell (as the standard windows list view control does change ToolTipExtGrid.GridTextExtender.ShowExtendedText() with the following code:

Point oCellPoint = oGrid.ViewLayout.RowColToPoint(nRow, nCol);
oCellPoint = oGrid.PointToScreen(oCellPoint);
oCellPoint = m_oParent.PointToClient(oCellPoint);
m_oLabel.Location = oCellPoint;

Joel

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.

;