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.

ToolTipText for GridControl

Thread ID:





30753 Jun 23,2005 05:18 AM Jun 23,2005 08:00 AM Windows Forms 4
Tags: GridControl
Anna Srinivasan
Asked On June 23, 2005 05:18 AM

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 05:34 AM

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 05:43 AM

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 07:25 AM

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 08:00 AM

Thanks a lot.


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.