public void SaveLayout(DevExpress.XtraGrid.Views.Grid.GridView view, string gridName) { if (!this.DesignMode) { var regPath = RegUtils.RegBasePath("GridLayout\\" + gridName); view.SaveLayoutToRegistry(regPath.ToString()); } }
public void SaveLayout(DevExpress.XtraGrid.Views.Grid.GridView view, string gridName) { if (!this.DesignMode) { var regPath = RegUtils.RegBasePath("GridLayout\\" + gridName); var options = new OptionsLayoutGrid(); options.Columns.RemoveOldColumns = true; options.Columns.AddNewColumns = true; options.StoreDataSettings = false; view.SaveLayoutToRegistry(regPath.ToString(), options); } }