【问题标题】:how can o auto generate for xml for radgridview layout如何为 radgridview 布局自动生成 xml
【发布时间】:2019-12-19 20:38:07
【问题描述】:

我正在设置 Telerik GridView。首先我需要创建 xml 以在 c# 中保存和加载 RadGridView 布局(列设置、排序、组......)。这需要一些时间。我可以自动拥有它吗(自动生成布局的 xml)?

【问题讨论】:

    标签: xml layout radgridview


    【解决方案1】:
    private void SaveButton_Click(object sender, EventArgs e)
    {
        string s = "default.xml";
        SaveFileDialog dialog = new SaveFileDialog();
        dialog.Filter ="xml files (*.xml)|*.xml|All files (*.*)|*.*";
        dialog.Title = "Select a xml file";
        if (dialog.DisplayDialog() == DialogResult.OK)
        {
            s = dialog.FileName;
        }
        this.ketticGridView.SaveLayout(s);
    }
    
    private void LoadButton_Click(object sender, EventArgs e)
    {
        string s = "default.xml";
        OpenFileDialog dialog = new OpenFileDialog();
        dialog.Filter ="xml files (*.xml)|*.xml|All files (*.*)|*.*";
        dialog.Title = "Select a xml file";
        if (dialog.DisplayDialog() == DialogResult.OK)
        {
            s = dialog.FileName;
        }
        this.ketticGridView.LoadLayout(s);
    }
    

    【讨论】:

      猜你喜欢
      • 2015-04-02
      • 2015-01-12
      • 1970-01-01
      • 2018-04-20
      • 1970-01-01
      • 1970-01-01
      • 2019-04-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多