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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ChangeCells - combining multiple styles

Thread ID:

Created:

Updated:

Platform:

Replies:

6093 Jul 30,2003 04:06 PM UTC Jul 31,2003 09:28 AM UTC WinForms 2
loading
Tags: GridControl
Paul Laudeman
Asked On July 30, 2003 04:06 PM UTC

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!)

Administrator [Syncfusion]
Replied On 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);

Paul Laudeman
Replied On July 31, 2003 09:28 AM UTC

That's it, I just wasn't clear on the StyleModifyType options. Thanks!

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

;