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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Setting Cell Tool Tip via e.Inner.Style.CellTipText

Thread ID:





20572 Oct 21,2004 07:25 AM UTC Nov 30,2011 01:31 PM UTC WinForms 6
Tags: Grouping
Jason Hales
Asked On October 21, 2004 07:25 AM UTC

I''m currently using the PrepareViewStyleInfo to set the tooltip when a user hovers over a specic column in the grid. It all works fine but I was wondering on the most effective way to do this - PrepareViewStyleInfo seems to be fired an awful lot. The tooltip never changes at runtime - it''s just calculated based on the record ID which I store in a hashtable. Is it possible to "lock" the CellTipText for a cell and only get it if it''s null? Is there a "Handled" or some sort of storage mechanism. Any help would be appreciated - excellet product so far

Administrator [Syncfusion]
Replied On October 21, 2004 08:13 AM UTC

If the tip is the same for all cells in the column, you can set this in the columns Appearance object once, say in formload, or from the designer. this.gridGroupingControl1.TableDescriptor.Columns["Col2"].Appearance.AnyRecordFieldCell.CellTipText = "the column tip"; But if the tip is to vary for cell to cell in the column, then you would have to do it in TableControlPrepareViewStyleInfo or in QueryCellStyleInfo.

Jason Hales
Replied On October 25, 2004 06:49 AM UTC

Thanks for your help - Jason

James Blibo
Replied On March 8, 2007 10:48 PM UTC

Can you bind the tooltip to the datasource in the same manner that you bind the ggc to a datasource?

Administrator [Syncfusion]
Replied On March 9, 2007 08:34 PM UTC

Hi James,

One way you can handle this by using QueryCellInfo event of the Grid and set the e.Style.CellTipText to underlying datasource value. Please try attached sample and let me know if this helps.


Best Regards,

SF Lee
Replied On November 28, 2011 11:34 PM UTC


It seems the above link doesn't work. In fact the entire subdomain (http://websamples.syncfusion.com/) no longer exists. Can you please give us the new link for the sample code?


Ragamathulla B [Syncfusion]
Replied On November 30, 2011 01:31 PM UTC

Hi Sau Fan Lee,

Thanks for the update.

You can set the celltooltip text by using QueryCellInfo or PrepareViewStyleInfo event. The following code Explains the same.

//Way 1

void TableControl_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
e.Style.CellTipText = e.Style.Text;

//Way 2

void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
e.Style.CellTipText = e.Style.Text;

Please refer to the following sample link Which illustrates the same.


Please let me know if you have any further concerns.

Ragamathullah B.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon