Cell Data Tooltip
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
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
SIGN IN To post a reply.
4 Replies
AD
Administrator
Syncfusion Team
November 24, 2006 10:32 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. 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
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
TH
Tannearu Hazarathaiah Gupta
November 24, 2006 11:11 AM UTC
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
AD
Administrator
Syncfusion Team
November 24, 2006 11:33 AM UTC
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
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
GM
Gaukhar Massabayeva
March 13, 2013 03:38 PM UTC
Is there above solution for GGC?
SIGN IN To post a reply.
- 4 Replies
- 3 Participants
-
TH Tannearu Hazarathaiah Gupta
- Nov 24, 2006 09:02 AM UTC
- Mar 13, 2013 03:38 PM UTC