private FormattedTable GetMainTable() { var data = this.GetMainData(); // Default sorting var view = data.DefaultView; view.Sort = data.Columns["prioritylevel"].ColumnName; // Create formatted table var table = new FormattedTable(view.ToTable()); table.AddTableFormatting(true); // Column renaming table.AddColumnRenaming("prioritylevel", "PRIORITY LEVEL"); // Other formatting table.AddFormatting(new RangeFormatting( Format.Currency, 0, 2, data.Rows.Count, data.Columns.Count - 2)); return(table); }
private FormattedTable GetMainTable() { var data = this.GetMainData(); // Default sorting var view = data.DefaultView; view.Sort = data.Columns["year_"].ColumnName; // Create formatted table var table = new FormattedTable(view.ToTable()); table.AddTableFormatting(true); // Column renaming table.AddColumnRenaming("year_", "YEAR"); // Other formatting table.AddFormatting(new RangeFormatting( Format.Currency, 0, 1, data.Rows.Count, data.Columns.Count - 1)); return(table); }