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 Tooltip

Thread ID:

Created:

Updated:

Platform:

Replies:

52262 Nov 24,2006 04:02 AM Mar 13,2013 11:38 AM Windows Forms 4
loading
Tags: GridControl
Tannearu Hazarathaiah Gupta
Asked On November 24, 2006 04:02 AM

HI,

I am using Grid Data Bound Grid(Syncfusion)

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 'tooltip' when that cell is hovered over.



Regards
Tannearu Hazarthaiah

Administrator [Syncfusion]
Replied On November 24, 2006 05:32 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. Here is a code snippet to show this.

////The the form class:
private GridTextExtender m_oGridTextExtender = null;

////On form load:
m_oGridTextExtender = new GridTextExtender(this);

///// In the grid's MouseMove event handler:
private void grid_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
m_oGridTextExtender.Show(grid, new Point(e.X, e.Y));
}

Please refer the sample for implementation.
GDBGCellToolTipText.zip

Best Regards,
Haneef

Tannearu Hazarathaiah Gupta
Replied On November 24, 2006 06:11 AM


HI Haneef,
Thanks for your reply. I am unable to add the class its giving error.

Please give me detial.

////The the form class:
private GridTextExtender m_oGridTextExtender = null;

////On form load:
m_oGridTextExtender = new GridTextExtender(this);


Regards
Tannearu Hazarathaiah

Administrator [Syncfusion]
Replied On November 24, 2006 06:33 AM

Hi Tannearu,

The following steps to use the "ToolTipext.cs" file in your application.

1) Add the "ToolTipext.cs" file to your application. The "ToolTipext.cs" file placed in last post sample.

Or

Copy the "ToolTipext.cs" file to your application.

2) Use the Namespace name to access the class. [NameSpace is ToolTipExtGrid ]

3) In Form class, add the below line to declare the GridTextExtender object.
/////private ToolTipExtGrid.GridTextExtender m_oGridTextExtender = null;

4) Create the instance of GridTextExtender class in Form's load event.
/////m_oGridTextExtender = new ToolTipExtGrid.GridTextExtender(this);

5)Handle the MouseMove event of the grid to show the tooltip. Here is a code

private void gridDataBoundGrid1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
m_oGridTextExtender.Show(this.gridDataBoundGrid1 , new Point(e.X, e.Y));
}

Best Regards,
Haneef

Gaukhar Massabayeva
Replied On March 13, 2013 11:38 AM

Is there above solution for GGC?

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.

;