Professional UI Solutions
Site Map   /  Register

Cell Styles

How to adjust cell styles at design time?

While the grid control is selected, click the ellipsis button next to the CellStyles property in the Properties pane. The Cell Styles Editor dialog with a list of all the available style types opens. Select the cell style type you want to modify and edit its properties in the property grid on the left. You can always reset any modified property to its default value by selecting Reset in the context menu for this property.

How to customize cell styles for the data bound grid programmatically?

The data bound grid (the BoundGridControl class) is designed in a way that only visible cells and rows exist. In other words, when the grid contents is scrolled, some instances of cells and rows are destroyed and some others are created. This makes it possible to greatly minimize the memory overhead and improve the performance. But because of that, you cannot just modify cell style property values at the row and cell levels directly: when the end user scrolls through the grid, these style changes will be lost.

You can easily customize cell styles at the row and cell levels by using the CellStyleCreated and/or ModifyCellStyle events. Just subscribe to one or both of these events and define a custom logic that requires adjusting cell style values. Now when the user scrolls the grid contents, the above events are fired and all necessary styles are modified correctly in the event handlers. For details about how to implement handlers for these events, please read the article Styles and Formatting.

If you have any questions, please visit our forum or contact our technical support team at