I would like to be able to use the ChangeCells method of the grid to iteratively build my final style for my cells. For instance, I have commonly defined cell styles such as currency, percent, etc. but I might also want to have other seperate GridStyleInfo style objects for other properties, such as background color or border color.
I can't seem to figure out how to get the ChangeCells method to iteratively build my final cell.
(hoping we can get approval for our order for the suite with the source code to go through so I can really get a handle on how things work!)
ADAdministrator Syncfusion Team July 30, 2003 12:59 PM
Here is some code. I am not sure if this is what you had in mind or not.
GridStyleInfo boldRedFont = new GridStyleInfo();
boldRedFont.Font.Bold = true;
boldRedFont.TextColor = Color.Red;
GridStyleInfo blueCell = new GridStyleInfo();
blueCell.BackColor = Color.DodgerBlue;
blueCell.Borders.Right = new GridBorder(GridBorderStyle.Solid, Color.Blue, GridBorderWeight.Thin);
blueCell.Borders.Bottom = new GridBorder(GridBorderStyle.Solid, Color.Blue, GridBorderWeight.Thin);
this.gridControl1.ChangeCells(GridRangeInfo.Cells(2,2,4,4), blueCell, Syncfusion.Styles.StyleModifyType.Override);
this.gridControl1.ChangeCells(GridRangeInfo.Cells(2,2,4,4), boldRedFont, Syncfusion.Styles.StyleModifyType.Override);
PLPaul LaudemanJuly 31, 2003 05:28 AM
That's it, I just wasn't clear on the StyleModifyType options.