当前位置: 首页>>代码示例>>C#>>正文


C# IReport.GetAllowSort方法代码示例

本文整理汇总了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;
            }
        }
开发者ID:dedimarco,项目名称:evemarketmonitorapp,代码行数:61,代码来源:ViewReport.cs


注:本文中的IReport.GetAllowSort方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。