Beispiel #1
0
        /// <summary>
        /// get color of cell
        /// </summary>
        /// <param name="tableControl"></param>
        /// <param name="row"></param>
        /// <param name="colIndex"></param>
        /// <returns></returns>
        internal virtual Color GetCellColor(int row, int colIndex)
        {
            Color color = tableControl.BgColor;

            if (tableControl.ShouldCheckAlternateOrColumnColor(row))
            {
                if (tableControl.IsRowAlternate(row))
                {
                    color = tableControl.AlternateColor;
                }
                else if (tableControl.IsColoredByRow)
                {
                    color = tableControl.GetColorbyRow(row);
                }
                else
                {
                    // paint with column color
                    color = ColumnColor(colIndex);
                }
            }
            return(color);
        }