The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hello,
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.
Thanks!
(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 04:59 PM UTC
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 09:28 AM UTC
That's it, I just wasn't clear on the StyleModifyType options.
Thanks!