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

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

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

6 Replies

AD Administrator Syncfusion Team 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.

JH Jason Hales October 25, 2004 06:49 AM UTC

Thanks for your help - Jason

JB James Blibo 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?

AD Administrator Syncfusion Team 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,

SL SF Lee 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?


RB Ragamathulla B Syncfusion Team 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.

Live Chat Icon For mobile
Up arrow icon