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.
Syncfusion Feedback

Syntax highlight grid engine formulas

Thread ID:

Created:

Updated:

Platform:

Replies:

80563 Apr 10,2009 10:07 PM UTC Apr 20,2009 11:45 AM UTC Windows Forms 3
loading
Tags: EditControl
Jerry Lawrence
Asked On April 10, 2009 10:07 PM UTC

Trying ot highlight some Excel type formula (actually grid engine formulas).

I would like to color the sheet name in a cell reference:

Sheetname!Section.Cell

I've tried setting Sheetname! to KeyWord but that does not color Sheetname!

Is this doable?

Thanks,

Jerry


Rajadurai C [Syncfusion]
Replied On April 16, 2009 12:01 PM UTC

Hi Jerry,

Thanks for your interest in Syncfusion products.

If you would like to highlight the sheet name (if used) in the formula cell in grid, please try the following code.

GridFormulaCellRenderer rend = this.gridCalculations.CellRenderers["FormulaCell"] as GridFormulaCellRenderer;
string str = rend.GetDisplayText();
if (str.Contains("!"))
{
string[] str1 = str.Split('!');
str2 = str1[0].Substring(1);
Console.WriteLine(str2);
rend.TextBox.Select(1, str2.Length);
}


This highlights the sheetname if referred in the formulacell in grid.

Regards,
Rajadurai


Jerry Lawrence
Replied On April 16, 2009 06:38 PM UTC

I guess my question was not clear. By syntax highlight, I mean change the color, font, etc.

For example, I would like SheetName! to be blue. Ideally, I would like to set this in the EditControl config file.

I've tried making "SheetName!" a KeyWord and string in the config file, but the text color does not change.




Administrator [Syncfusion]
Replied On April 20, 2009 11:45 AM UTC

Hi Jerry,

Please find the shipped sample from the location below that uses config.xml file and apply syntax coloring for keywords and operators used in the EditControl.

..\Windows\Edit.Windows\Samples\2.0\Syntax Highlighting\Custom Config File

Please let me know if this helps you.

Regards,
Jaya


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.

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

;