本文整理汇总了C#中DevExpress.ClearGrouping方法的典型用法代码示例。如果您正苦于以下问题:C# DevExpress.ClearGrouping方法的具体用法?C# DevExpress.ClearGrouping怎么用?C# DevExpress.ClearGrouping使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DevExpress
的用法示例。
在下文中一共展示了DevExpress.ClearGrouping方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadLayout
public void LoadLayout(DevExpress.XtraGrid.Views.Grid.GridView view, string gridName, bool clearSortFilterGrouping = false)
{
if (!this.DesignMode)
{
var regPath = RegUtils.RegBasePath("GridLayout\\" + gridName);
if (RegUtils.PathExists(regPath))
{
view.RestoreLayoutFromRegistry(regPath.ToString());
if (clearSortFilterGrouping)
{
view.ClearColumnsFilter();
view.ClearGrouping();
view.ClearSorting();
}
}
}
}
示例2: ResetLayout
public void ResetLayout(DevExpress.XtraGrid.Views.Grid.GridView view, string gridName)
{
RegUtils.DeleteSetting("GridLayout\\" + gridName);
view.ClearColumnsFilter();
view.ClearGrouping();
view.ClearSorting();
if (view.GetType() == typeof(DevExpress.XtraGrid.Views.BandedGrid.BandedGridView))
{
var bandedView = (DevExpress.XtraGrid.Views.BandedGrid.BandedGridView) view;
foreach (DevExpress.XtraGrid.Views.BandedGrid.GridBand band in bandedView.Bands)
band.Visible=true;
}
}
示例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);
}