博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
devgridContral
阅读量:7068 次
发布时间:2019-06-28

本文共 1375 字,大约阅读时间需要 4 分钟。

  #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);
            }

            ---

转载于:https://www.cnblogs.com/lvlaozf/p/8880446.html

你可能感兴趣的文章
内核双链队列
查看>>
Linux 下 Redis 安装详解
查看>>
ActiveMQ第三弹:在Spring中使用内置的Message Broker
查看>>
C#:struct的陷阱:无法修改“xxx”的返回值,因为它不是变量
查看>>
Android WebRTC 音视频开发总结(一)
查看>>
C# 获取 mp3文件信息
查看>>
如何转换SQL Server 2008数据库到SQL Server 2005
查看>>
cocos2dx 常见的22种特效 3D特效
查看>>
WinForm触摸屏程序功能界面长时间不操作自动关闭回到主界面 z
查看>>
[译]MVC网站教程(四):MVC4网站中集成jqGrid表格插件(系列完结)
查看>>
angular学习笔记(九)-css类和样式3
查看>>
C#开发微信门户及应用(8)-微信门户应用管理系统功能介绍
查看>>
Oracle由ID生成父ID的函数
查看>>
互斥量和条件变量的区别
查看>>
Lambda 表达式的示例
查看>>
poj 1002:487-3279(水题,提高题 / hash)
查看>>
查询/新建/修改本地用户和组
查看>>
iOS开发UI篇—ios应用数据存储方式(XML属性列表-plist)
查看>>
04 对象与类
查看>>
使用jQuery Mobile和Phone Gap开发Android应用程序
查看>>