• devgridContral


      #region 加载gridControl布局项
            /// <summary>
            /// 加载gridControl布局项
            /// </summary>
            private void LoadLayoutFile()
            {
                string strLayOutFilePath = GdkyConstant.RootDirectory + "config\Layout\conInstLayout.xml";
                if (File.Exists(strLayOutFilePath))
                {
                    grdConData.ForceInitialize();
                    OptionsLayoutBase optionLayout = new OptionsLayoutBase();
                    grdConData.MainView.RestoreLayoutFromXml(strLayOutFilePath, optionLayout);
                }
            }

       #region 保存gridControl布局项
            /// <summary>
            /// 保存gridControl布局项
            /// </summary>
            private void SaveLayoutFile()
            {
                string strLayOutTmp = GdkyConstant.RootDirectory + "config\Layout";
                if (!Directory.Exists(strLayOutTmp))
                {
                    Directory.CreateDirectory(strLayOutTmp);
                }
                string strLayOutFilePath = string.Format("{0}\{1}.xml", strLayOutTmp, "conInstLayout");
                OptionsLayoutBase optionLayout = new OptionsLayoutBase();
                grdConData.MainView.SaveLayoutToXml(strLayOutFilePath, optionLayout);
            }
            #endregion

               

               /////----获取配置文件

               string strLayOutTmp =Environment.CurrentDirectory+ "config\Layout";
                if (!File.Exists(strLayOutTmp))
                {
                    Directory.CreateDirectory(strLayOutTmp);
                }
                string strLayOutFilePath = string.Format("{0}\{1}.xml", strLayOutTmp, "MsInstLayout");
            

                DataTable dt = new DataTable();
                dt = this.testDataSet1.Table_1;
                if (dt.Rows.Count > 0)
                {
                string xmlContent=dt.Rows[0][0].ToString();
                CreatXmlToSave(xmlContent, strLayOutFilePath);
                }

                ////---

  • 相关阅读:
    SharePoint 2007中的Permission Level与Permission之间的关系
    如何确定一个SharePoint列表的ID?
    经典线程死锁
    SharePoint的Workflow History列表在哪里?
    SharePoint Designer中设计的workflow出错了, 怎么办?
    清除MOSS的Timer Job Cache的方法 Clear the SharePoint Configuration Cache
    sp_MSforeachtable和sp_MSforeachdb
    sa安全
    几个排名函数的区别
    递归限制
  • 原文地址:https://www.cnblogs.com/lvlaozf/p/8880446.html
Copyright © 2020-2023  润新知