//配置信息所保存的位置
private static string Path = Application.StartupPath + "//GridLayOutConfig//";
/// <summary>
/// 保存视图配置信息
/// </summary>
/// <param name="gridView">要保存的gridView</param>
/// <param name="fileName">保存的文件名称</param>
public static void Save(GridView gridView, string fileName)
{
string fullPath = Path + fileName;
if (!Directory.Exists(Path))
Directory.CreateDirectory(Path);
if (!File.Exists(fullPath))
{
FileStream fs = File.Create(fullPath);
fs.Flush();
fs.Close();
}
gridView.SaveLayoutToXml(fullPath, OptionsLayoutBase.FullLayout);
}<