You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »


Download the Solution Example: DataGridWithColors.dbsln

  • Solution Name: DataGridWithColors
  • Software Version: v10 Update 1b
  • Keywords: Data visualization. Displays. DataGrid. Colors.

Summary

This page outlines the customization of a DataGrid object. The customization includes modifying row and cell colors dynamically based on predefined conditions.


Technical Information

Before customizing DataGrid colors, the data source must be configured to handle it. However, this example preloads data in the CodeBehind to demonstrate the color customization.

Key Features

Row Customization

  • Method: OnCustomizeRow(DataRow row, Dictionary<string, object> attributes)
  • Description: Changes the background and text colors of rows in coloredGridByRow based on row index parity, applying alternating colors for even and odd indices.

Cell Customization

  • Method: OnCustomizeCell(string columnName, DataRow row, Dictionary<string, object> attributes)
  • Description: Checks if the cell belongs to the "Status" column. If so, it converts the value and, if the value is according to defined, it modifies the cell colors.

Reference Information

→ See DataGrid Control for more information.


In this section:

The root page @parent could not be found in space v10.

  • No labels