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. Image for the cookie policy date

Cell Data longerthan the Current Column width

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


2 Replies

AD Administrator Syncfusion Team December 1, 2006 10:56 AM UTC

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


VO VoxCode March 5, 2007 02:42 AM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon