把活动视图的布局保存到本地Xml文件中,使用SaveLayoutToXml 和 RestoreLayoutFromXml方法。
using DevExpress.XtraGrid;
   // ...string fileName = "c:\\XtraGrid_SaveLayoutToXML.xml";

   privatevoid Form1_Load(object sender, System.EventArgs e) 
{
      gridControl1.ForceInitialize();
      // Restore the previously saved layout 
      gridControl1.MainView.RestoreLayoutFromXml(fileName);
    }

    privatevoid Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
      // Save the layout to an XML file 
      gridControl1.MainView.SaveLayoutToXml(fileName);
     }

相关文章:

  • 2021-12-15
  • 2021-12-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-13
相关资源
相似解决方案