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.

FancyTooltip with Custom Text

Thread ID:

Created:

Updated:

Platform:

Replies:

96725 Sep 30,2010 05:34 PM Oct 6,2010 01:14 PM Windows Forms 1
loading
Tags: GridControl
Robert Avery
Asked On September 30, 2010 05:34 PM

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?



Christopher Issac Sunder K [Syncfusion]
Replied On October 6, 2010 01:14 PM

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.



CONFIRMATION

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.

;