FancyTooltip with Custom Text

FancyTooltips for my series currently displays the following:

Price [38898, 38.581940285]

I was hoping there was a way (e.g., through the PrepareStyle event) that I could format the FancyTooltip to instead be something like:

Date = 1/2/2008 ; Value = 38.58

Is this possible?



1 Reply

CI Christopher Issac Sunder K Syncfusion Team October 6, 2010 05:14 PM UTC

Hi Robert,

Thank you for your interest in Syncfusion products.

Setting the ToolTip of a particular cell in GridControl can be achieved by handling the “PrepareViewStyleInfo” as you recommend in the query.


this.gridControl1.PrepareViewStyleInfo += new GridPrepareViewStyleInfoEventHandler(gridControl1_PrepareViewStyleInfo);

void gridControl1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
{
if (e.ColIndex == 3 && e.Style.Text!=string.Empty) // set tooltip to 3rd column only.
{
string value = e.Style.Text.Substring(0, e.Style.Text.IndexOf('.') + 3);
e.Style.CellTipText = "Date = " + DateTime.Now.ToShortDateString() + " ; Value = " + value;
}
}


Please refer the following sample which illustrates the above.

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=GC_ToolTip646047788.zip

Please let me know if you have any other clarifications.

Regards,
Christo.



Loader.
Up arrow icon