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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ToolTipText for GridControl

Thread ID:

Created:

Updated:

Platform:

Replies:

30753 Jun 23,2005 09:18 AM UTC Jun 23,2005 12:00 PM UTC WinForms 4
loading
Tags: GridControl
Anna Srinivasan
Asked On June 23, 2005 09:18 AM UTC

Hi, I am using Syncfusion Custom Control derived from gridControl. Q1: How do i set tooltip text ..? Q2: How do i identify which column it is..? Q3: ToolTipText should be what is present in corresponding cell.

Administrator [Syncfusion]
Replied On June 23, 2005 09:34 AM UTC

You set the style.ToolTipText for the particular cell. You can do this in QueryCellInfo.
private void grid_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
{
	if(e.RowIndex > 0 && e.ColIndex > 0)
	{
		e.Style.CellTipText = e.Style.FormattedText;//maybe .Text or some other string...
	}
}

Anna Srinivasan
Replied On June 23, 2005 09:43 AM UTC

Hi, I need to set the tool tip at runtime when the user moves the mouse over each cell of the grid. The Text value of the cell should be set as tool tip for the corresponding cell. Thanks, Anna

Administrator [Syncfusion]
Replied On June 23, 2005 11:25 AM UTC

Try it in PrepareViewStyleInfo. This worked for me.
private void Form1_Load(object sender, System.EventArgs e)
{
	this.gridControl1[1,1].Text = "SomeText in Cell 1,1";
	this.gridControl1[2,1].Text = "SomeText in Cell 2,1";
	this.gridControl1[1,2].Text = "SomeText in Cell 1,2";
	this.gridControl1[2,2].Text = "SomeText in Cell 2,2";
	this.gridControl1.PrepareViewStyleInfo += new GridPrepareViewStyleInfoEventHandler(gridControl1_PrepareViewStyleInfo);
}

private void gridControl1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
{
	if(e.ColIndex > 0 && e.RowIndex > 0)
	{
		e.Style.CellTipText = e.Style.Text;
	}
}

Anna Srinivasan
Replied On June 23, 2005 12:00 PM UTC

Thanks a lot.

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.

Warning Icon 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.Close Icon

;