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


C# DevExpress.EndSort方法代码示例

本文整理汇总了C#中DevExpress.EndSort方法的典型用法代码示例。如果您正苦于以下问题:C# DevExpress.EndSort方法的具体用法?C# DevExpress.EndSort怎么用?C# DevExpress.EndSort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DevExpress的用法示例。


在下文中一共展示了DevExpress.EndSort方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DeleteSelectedRows

        public void DeleteSelectedRows(DevExpress.XtraGrid.Views.Grid.GridView view)
        {
            if (view == null || view.SelectedRowsCount == 0) return;

            DataRow[] rows = new DataRow[view.SelectedRowsCount];

            for (int i = 0; i < view.SelectedRowsCount; i++)
                rows[i] = view.GetDataRow(view.GetSelectedRows()[i]);

            view.BeginSort();

            try
            {
                foreach (DataRow row in rows)
                    row.Delete();
            }
            finally
            {
                view.EndSort();
            }
        }
开发者ID:tofupl,项目名称:Csharp,代码行数:21,代码来源:ws.cs

示例2: DeleteFocusedRows

        private void DeleteFocusedRows(DevExpress.XtraGrid.Views.Grid.GridView view)
        {
            if (view.RowCount > 0 && view.IsValidRowHandle(view.FocusedRowHandle) && !view.IsNewItemRow(view.FocusedRowHandle))
            {
                view.BeginSort();
                try
                {
                    view.DeleteRow(view.FocusedRowHandle);

                }
                catch (Exception)
                {
                }
                view.EndSort();
            }
        }
开发者ID:daleksShared,项目名称:ZovMarket,代码行数:16,代码来源:FrmDealerEdit.cs

示例3: ConfigGridView

        public static void ConfigGridView(DevExpress.XtraGrid.Views.Grid.GridView gridView, string[] bestFitColumns = null, string[] invisibleColumns = null, bool readOnly = false, string[] readOnlyColumns = null, bool allowGroup = false, string[] groupColumns = null, bool merge = false, string[] mergeColumns = null, bool allowFilter = true, bool allowSort = true)
        {
            gridView.OptionsCustomization.AllowFilter = allowFilter;
            gridView.OptionsCustomization.AllowSort = allowSort;

            //AutoSizeColumn
            //gridView.BestFitColumns();

            if (bestFitColumns != null)
            {
                foreach (var column in bestFitColumns)
                {
                    gridView.Columns[column].BestFit();
                }
            }

            //Visible column
            if (invisibleColumns != null)
            {
                foreach (var column in invisibleColumns)
                {
                    gridView.Columns[column].Visible = false;
                }
            }

            //Readonly
            gridView.OptionsBehavior.ReadOnly = readOnly;

            if (!readOnly && readOnlyColumns != null)
            {
                foreach (var column in readOnlyColumns)
                {
                    gridView.Columns[column].OptionsColumn.ReadOnly = true;
                }
            }

            //group column
            gridView.OptionsCustomization.AllowGroup = allowGroup;

            if (groupColumns != null)
            {
                gridView.BeginSort();
                try
                {
                    gridView.ClearGrouping();
                    int index = 0;
                    foreach (var column in groupColumns)
                    {
                        gridView.Columns[column].GroupIndex = index++;
                    }
                }
                finally
                {
                    gridView.EndSort();
                }
            }

            //merge column
            gridView.OptionsView.AllowCellMerge = merge;

            if (mergeColumns != null)
            {
                for (int i = 0; i < gridView.Columns.Count; i++)
                {
                    gridView.Columns[i].OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False;
                }

                foreach (var column in mergeColumns)
                {
                    gridView.Columns[column].OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True;
                }
            }

            ReconfigGridView(gridView);
        }
开发者ID:cuongpv88,项目名称:work,代码行数:75,代码来源:GridHelper.cs


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