private void LoadTableToGrid(PLReportDataTable table) { gridViewReportData.Columns.Clear(); if (table == null) return; ArrayList listCol = table.GetColumns(); for (int i = 0; i < listCol.Count; i++) { GridColumn col = (GridColumn)listCol[i]; gridViewReportData.Columns.Add(col); } gridControlReportData.DataSource = table.DataSource; }
private void Init() { if (_DSList != null) { for (int i = 0; i < _DSList.Count; i++) { PLReportDataTable table = null; if (_DSList[i] != null && ((DataSet)_DSList[i]).Tables.Count > 0) { if (DSListName != null && i < DSListName.Length) { table = new PLReportDataTable(DSListName[i], ((DataSet)_DSList[i]).Tables[0]); } else table = new PLReportDataTable("Bảng " + i, ((DataSet)_DSList[i]).Tables[0]); } else { if (DSListName != null && i < DSListName.Length) { table = new PLReportDataTable(DSListName[i], null); } else table = new PLReportDataTable("Bảng " + i, null); } if (table != null) DataTables.Add(table); } } }