private void spreadsheetControl1_CustomDrawCellBackground(object sender,
                                                                  CustomDrawCellBackgroundEventArgs e)
        {
            // Specify the background color for the active cell.
            if (e.Cell == spreadsheetControl1.ActiveCell)
            {
                e.BackColor = Color.FromArgb(50, 200, 44, 74);
                return;
            }

            // Specify the background color for cells that contain data and belong to odd rows.
            var dataRange = e.Cell.Worksheet.GetDataRange();

            if (e.Cell.IsIntersecting(dataRange) && e.Cell.RowIndex % 2 != 0)
            {
                e.BackColor = Color.FromArgb(50, 91, 155, 213);
            }
        }
Example #2
0
 void spreadsheetControl1_CustomDrawCellBackground(object sender, CustomDrawCellBackgroundEventArgs e)
 {
     if(String.IsNullOrEmpty(e.Cell.Formula))
         return;
 }
Example #3
0
 void DrawCellFill(CustomDrawCellBackgroundEventArgs e, bool isError)
 {
     e.BackColor = isError ? DXColor.FromArgb(0xFF, 0xA5, 0xA5) : DXColor.Empty;
 }