本文整理汇总了C#中IReport.GetAllowSort方法的典型用法代码示例。如果您正苦于以下问题:C# IReport.GetAllowSort方法的具体用法?C# IReport.GetAllowSort怎么用?C# IReport.GetAllowSort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IReport
的用法示例。
在下文中一共展示了IReport.GetAllowSort方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ViewReport
public ViewReport(IReport report, IskMultiplier valuesShown)
{
InitializeComponent();
this.valuesShown = valuesShown;
this.report = report;
allowSort = report.GetAllowSort();
BuildDataTable();
view = new DataView(table);
view.RowFilter = "Visible = 'True'";
// Set a few things to improve performance...
reportGrid.EnableHeadersVisualStyles = false;
reportGrid.CellBorderStyle = DataGridViewCellBorderStyle.None;
reportGrid.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;
reportGrid.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.None;
reportGrid.DataSource = view;
reportGrid.VirtualMode = true;
// Clear the header text on the row headers column.
reportGrid.Columns["RowHeaders"].HeaderText = "";
// Make the row names, visible and expanded columns invisible.
reportGrid.Columns["RowNames"].Visible = false;
reportGrid.Columns["Visible"].Visible = false;
reportGrid.Columns["Expanded"].Visible = false;
// Set column header text.
foreach (DataGridViewColumn column in reportGrid.Columns)
{
column.HeaderText = table.Columns[column.Name].Caption;
column.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
}
// Add a column to hold the expand/collapse icons
DataGridViewImageColumn expandersColumn = new DataGridViewImageColumn();
expandersColumn.Name = "Expanders";
expandersColumn.HeaderText = "";
expandersColumn.DisplayIndex = 1;
reportGrid.Columns.Add(expandersColumn);
reportGrid.CellValueNeeded += new DataGridViewCellValueEventHandler(reportGrid_CellValueNeeded);
reportGrid.CellClick += new DataGridViewCellEventHandler(reportGrid_CellClick);
reportGrid.KeyDown += new KeyEventHandler(reportGrid_KeyDown);
reportGrid.KeyUp += new KeyEventHandler(reportGrid_KeyUp);
// Check if a logo is to be used and load it if needed.
string logoFile = UserAccount.CurrentGroup.Settings.Rpt_LogoFile;
if (!logoFile.Equals("") && File.Exists(logoFile))
{
imgLogo.Image = Image.FromFile(logoFile);
int sideLength = Math.Min(180, Math.Max(imgLogo.Image.Width, imgLogo.Image.Height));
imgLogo.Width = sideLength;
imgLogo.Height = sideLength;
imgLogo.Visible = true;
}
else
{
imgLogo.Visible = false;
}
}