【问题标题】:DevExpress GroupRow - get information about DataRows belonging to that GroupRowDevExpress GroupRow - 获取有关属于该 GroupRow 的 DataRows 的信息
【发布时间】:2014-06-26 12:21:18
【问题描述】:

如果我按某个参数对我的 Grid 进行分组,是否有任何方法可以返回给我,比如说,该组中所有元素的名称列表。 例如我有一个汽车网格,我按国家对它们进行分组。然后我点击“德国”GroupRow。是否有任何功能可以放在某个按钮上,例如“导出选定的汽车”,它将返回给我该 GroupRow 中的所有汽车名称

【问题讨论】:

    标签: c# asp.net asp.net-mvc gridview devexpress


    【解决方案1】:

    此信息只能使用服务器代码获取。例如:

    List<object> GetGroupNames(int groupRowVisibleIndex){
      List<object> result = new List<string>();
      int childCount = ASPxGridView1.GetChildRowCount(groupRowIndex);
    
      for(int i = 0; i < childCount; i ++)  
        result.Add(ASPxGridView1.GetChildRowValues(groupRowVisibleIndex, i, "CarName"));
    }
    

    这里是文档的链接,您可以在其中找到我在此代码中使用的所有方法的描述:

    ASPxGridView members

    【讨论】:

      猜你喜欢
      • 2014-09-16
      • 2017-12-10
      • 1970-01-01
      • 1970-01-01
      • 2020-03-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-21
      相关资源
      最近更新 更多