/// <summary> /// 加载表格配置 /// </summary> /// <param name="grid">表格对象</param> /// <param name="userID">用户ID</param> public void LoadConfig(XCITreeGrid grid, Guid userID) { string path = GetConfigPath(grid.GridID, userID); if (File.Exists(path)) { grid.RestoreLayoutFromXml(path, OptionsLayoutBase.FullLayout); } else { path = GetConfigPath(grid.GridID, new Guid()); if (File.Exists(path)) { grid.RestoreLayoutFromXml(path, OptionsLayoutBase.FullLayout); } } }
/// <summary> /// 加载表格配置 /// </summary> /// <param name="grid">表格对象</param> /// <param name="name">模板名称</param> public void LoadConfig(XCITreeGrid grid, string name) { string configName = AddTemplateName(grid.GridID, name); string path = GetPath(configName); if (File.Exists(path)) { grid.RestoreLayoutFromXml(path, OptionsLayoutBase.FullLayout); } }