private void InitializeComponent() { Document_FpSpread.SelectionBlockOptions = FarPoint.Win.Spread.SelectionBlockOptions.None; Document_FpSpread.Cursor = Cursors.Default; Document_SheetView.Reset(); Document_SheetView.Cells[Document_SheetView.Rows.Count - 1, Document_SheetView.Columns.Count - 1].Value = DBNull.Value; Document_SheetView.OperationMode = FarPoint.Win.Spread.OperationMode.ReadOnly; Document_SheetView.HorizontalGridLine = new GridLine(GridLineType.None); Document_SheetView.VerticalGridLine = Document_SheetView.HorizontalGridLine; Document_SheetView.RowHeaderVisible = false; Document_SheetView.ColumnHeaderVisible = false; }
public override void InitializeBSpread() { RemoveSuperfluousColumns(this.filteredParam); this.bsprData.ActiveSheet.RowCount = 0; this.bsprData.ActiveSheet.ColumnCount = 0; this.bsprData.ClearHead(); this.bsprData.AddHeadComplete(); this.bsprData.UseSpreadEdit = false; this.bsprData.Locked = true; this.bsprData.AutoGenerateColumns = true; this.bsprData.DataSource = this.filteredParam; foreach (DataTable dt in filteredParam.Tables) { SheetView sheet = new SheetView(); sheet.Reset(); sheet.SheetName = dt.TableName; this.bsprData.Sheets.Add(sheet); sheet.DataSource = dt; for (int cIdx = 0; cIdx < sheet.Columns.Count; cIdx++) { sheet.ColumnHeader.Cells[0, cIdx].Text = dt.Columns[cIdx].ToString(); } } this.bsprData_Sheet1.Visible = false; UpdateRowColor(this.bsprData); if (this.isVisibleRawData) { RemoveSuperfluousColumns(this.filteredRaw); this.bsprRawData.ActiveSheet.RowCount = 0; this.bsprRawData.ActiveSheet.ColumnCount = 0; this.bsprRawData.ClearHead(); this.bsprRawData.AddHeadComplete(); this.bsprRawData.UseSpreadEdit = false; this.bsprRawData.Locked = true; this.bsprRawData.AutoGenerateColumns = true; this.bsprRawData.DataSource = filteredRaw; foreach (DataTable dt in filteredRaw.Tables) { SheetView sheet = new SheetView(); sheet.Reset(); sheet.SheetName = dt.TableName; this.bsprRawData.Sheets.Add(sheet); sheet.DataSource = dt; for (int cIdx = 0; cIdx < sheet.Columns.Count; cIdx++) { sheet.ColumnHeader.Cells[0, cIdx].Text = dt.Columns[cIdx].ToString(); } } this.bsprRawData_Sheet1.Visible = false; UpdateRowColor(this.bsprRawData); } }