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

GGC, CellTipText and QueryCellStyleInfo

Hi,
Im currently using the PrepareViewStyleInfo event to set the CellTipText for a given column, but this gets run everytime ot paints the cell.

I only want to set the CellTipText when the mouse is hovering ober the cell. From your forum I found the QueryCellStyleInfo event which sounds like what I want, but I cant find it on a GGC.

Any ideas?

Thanks
John

6 Replies

HA haneefm Syncfusion Team May 2, 2007 02:44 PM UTC

Hi John,

Please try the sample and let me know if this helps.
GGCQueryCellStyleInfo.zip

Best regards,
Haneef


JH John H May 2, 2007 03:07 PM UTC

Hi Haneef,
My bad, I actually wanted to see how to do this on the GridControl. I don't see a QueryCellStyleInfo event.

Thanks
John


HA haneefm Syncfusion Team May 2, 2007 03:32 PM UTC

Hi John,

For GridControl, The QueryCellStyleInfo event is named as QueryCellInfo event. Please try the code snippet and let me know if this helps.

this.gridControl1.QueryCellInfo +=new GridQueryCellInfoEventHandler(gridControl1_QueryCellInfo);
private void gridControl1_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
{
if( e.ColIndex == 2)
{
e.Style.CellTipText = "Welcome";
}
}

Best regards,
Haneef


JH John H May 2, 2007 04:00 PM UTC

Hi Haneef,
The event doesn't fire for me, to I have to enable a property or change something else?

Thanks
John


HA haneefm Syncfusion Team May 2, 2007 05:29 PM UTC

Hi John,

Here is a sample that implement the QueryCellInfo for displaying the tooltip ina cell.
GridCellTipText.zip

Best regards,
Haneef


JH John H May 3, 2007 08:54 AM UTC

Hi Haneef,
Thanks for the example, but if you notice that even gets fired when painting the cell as well as when the mouse moved over it, so if you have 10 rows visible it will trigger the event at least 12 times.
I have code that takes a small amount of time to return, having that code run 10 or more times when its not needed is a waste and could show a slight delay in my app.

Any ideas?
Thanks
John

Loader.
Live Chat Icon For mobile
Up arrow icon