/// <summary> Constructor for a new instance of the CustomGrid_Style class </summary>
        /// <param name="Data_Source"> DataTable for which to atuomatically build the style for </param>
        public CustomGrid_Style( DataTable Data_Source )
        {
            // Declare collection of columns
            columns = new List<CustomGrid_ColumnStyle>();
            visibleColumns = new CustomGrid_VisibleColumns( columns );

            // Set some defaults
            default_columnWidth = 100;
            headerHeight = 23;
            rowHeight = 20;
            default_textAlignment = HorizontalAlignment.Center;
            default_backColor = System.Drawing.Color.White;
            default_foreColor = System.Drawing.Color.Black;
            alternating_print_backColor = System.Drawing.Color.Honeydew;
            gridLineColor = System.Drawing.Color.Black;
            headerForeColor = System.Drawing.SystemColors.WindowText;
            headerBackColor = System.Drawing.SystemColors.Control;
            rowSelectForeColor = System.Drawing.SystemColors.WindowText;
            rowSelectBackColor = System.Drawing.SystemColors.Control;
            noMatchesTextColor = System.Drawing.Color.MediumBlue;
            selectedColor = System.Drawing.Color.Yellow;
            sortable = true;
            column_resizable = true;
            primaryKey = -1;
            double_click_delay = 1000;

            // Set this data source
            this.Data_Source = Data_Source;
        }
Ejemplo n.º 2
0
        /// <summary> Constructor for a new instance of the CustomGrid_Style class </summary>
        /// <param name="Data_Source"> DataTable for which to atuomatically build the style for </param>
        public CustomGrid_Style(DataTable Data_Source)
        {
            // Declare collection of columns
            columns        = new List <CustomGrid_ColumnStyle>();
            visibleColumns = new CustomGrid_VisibleColumns(columns);

            // Set some defaults
            default_columnWidth         = 100;
            headerHeight                = 23;
            rowHeight                   = 20;
            default_textAlignment       = HorizontalAlignment.Center;
            default_backColor           = System.Drawing.Color.White;
            default_foreColor           = System.Drawing.Color.Black;
            alternating_print_backColor = System.Drawing.Color.Honeydew;
            gridLineColor               = System.Drawing.Color.Black;
            headerForeColor             = System.Drawing.SystemColors.WindowText;
            headerBackColor             = System.Drawing.SystemColors.Control;
            rowSelectForeColor          = System.Drawing.SystemColors.WindowText;
            rowSelectBackColor          = System.Drawing.SystemColors.Control;
            noMatchesTextColor          = System.Drawing.Color.MediumBlue;
            selectedColor               = System.Drawing.Color.Yellow;
            sortable           = true;
            column_resizable   = true;
            primaryKey         = -1;
            double_click_delay = 1000;

            // Set this data source
            this.Data_Source = Data_Source;
        }
 /// <summary> Constructore creates a new CustomGrid_VisibleColumns_Enumerator to iterate through
 /// the <see cref="CustomGrid_VisibleColumns"/> collection. </summary>
 /// <param name="styleCollection"> Collection of styles </param>
 public CustomGrid_VisibleColumns_Enumerator( CustomGrid_VisibleColumns styleCollection )
 {
     styles = styleCollection;
 }
 /// <summary> Constructore creates a new CustomGrid_VisibleColumns_Enumerator to iterate through
 /// the <see cref="CustomGrid_VisibleColumns"/> collection. </summary>
 /// <param name="styleCollection"> Collection of styles </param>
 public CustomGrid_VisibleColumns_Enumerator(CustomGrid_VisibleColumns styleCollection)
 {
     styles = styleCollection;
 }