Esempio n. 1
0
 public void LoadLayout(DevExpress.XtraGrid.Views.Grid.GridView view, string gridName)
 {
     if (!this.DesignMode)
     {
         var regPath = RegUtils.RegBasePath("GridLayout\\" + gridName);
         if (RegUtils.PathExists(regPath))
             view.RestoreLayoutFromRegistry(regPath.ToString());
     }
 }
Esempio n. 2
0
 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();
             }
         }
     }
 }