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
RC
Rajadurai C
Syncfusion Team
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
JL
Jerry Lawrence
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.
AD
Administrator
Syncfusion Team
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