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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Syntax highlight grid engine formulas

Thread ID:





80563 Apr 10,2009 10:07 PM UTC Apr 20,2009 11:45 AM UTC WinForms 3
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:


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

Is this doable?



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);
rend.TextBox.Select(1, str2.Length);

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


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.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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