【问题标题】:Need help making my DataGridView sortable需要帮助使我的 DataGridView 可排序
【发布时间】:2013-05-10 10:26:27
【问题描述】:

我有一个 DataGridView,我用从 Web 服务获取的数据填充。

AdminTool.adminWS.templateListDTO[] templateList = null;

AdminTool.adminWS.OwordBeanService owClient = new AdminTool.adminWS.AdminBeanService();

GetAllTemplateList templateListParameter = new GetAllTemplateList();

templateListParameter.UserLanguage = "EN";

templateList = owClient.GetAllTemplateList(templateListParameter);

dataGridTemplateList.DataSource = templateList;
dataGridTemplateList.Refresh();

我已将网格中所有列的 SortMode 设置为 Automatic,但它不会排序。我在网上做了一些研究,从我读过的文章中他们谈到了一个可排序的 BindingList,但我不知道如何继续。我是否应该将从 Web 服务获得的内容转换为可排序的 BindingList?如果是这样,我该怎么做?还有其他方法可以使我的网格可排序吗?

谢谢!

【问题讨论】:

    标签: c# data-binding datagridview bindinglist


    【解决方案1】:

    这个 jquery 网站帮助我在报告中做同样的事情。 http://www.jeasyui.com/tutorial/datagrid/datagrid8.php

    【讨论】:

    • 我正在使用 C#。抱歉,我在帖子中忽略了这一点。
    猜你喜欢
    • 1970-01-01
    • 2011-05-10
    • 1970-01-01
    • 2016-07-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-04
    • 1970-01-01
    相关资源
    最近更新 更多