Esempio n. 1
0
        private void InitGrid()
        {
            this.ColumnDisk.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleLeft;

            this.ColumnIndex.DataPropertyName        = "index";
            this.ColumnDisk.DataPropertyName         = "disk_desc";
            this.ColumnFreeSpace.DataPropertyName    = "free_space";
            this.ColumnTotalSize.DataPropertyName    = "total_size";
            this.ColumnCompleteScan.DataPropertyName = "complete_scan";
            this.ColumnScanLayer.DataPropertyName    = "scan_layer";

            this.dataGridView.AutoGenerateColumns   = false;
            this.dataGridView.AllowUserToResizeRows = false;

            foreach (DataGridViewColumn col in this.dataGridView.Columns)
            {
                col.SortMode = DataGridViewColumnSortMode.NotSortable;
            }

            gridViewData = ConvertDiskInfoToGrid(sqlData.GetAllDataFromDiskInfo());
            this.dataGridView.DataSource = gridViewData;
        }