【问题标题】:Dev Express GridView rows countDevexpress GridView 行数
【发布时间】:2011-07-26 22:55:05
【问题描述】:

System.Windows.Forms.DataGridView 中是DataGridView.Rows.Count。但是如何获取 Dev Express GridView 的行数?

【问题讨论】:

    标签: c# winforms devexpress xtragrid


    【解决方案1】:

    您需要在GridView 中获取View,然后访问RowCount 属性

    【讨论】:

    • 我来这里是为了寻找德尔福的​​答案。如果你喜欢我,你应该使用yourGridNameView.ViewData.RowCount
    【解决方案2】:

    在 Dev Express 中有一个 Grid Control 并且在这个 grid control 里面有一个视图,所以你可以使用 gridview.rowcount 属性获取gridview中的行数。

    【讨论】:

      【解决方案3】:

      Dim rowCount As Integer = 0 '''declare rowCount as integer to hold the count value

      GridView.RowCount = rowCount '''//Now assign the the count to rowCount

      【讨论】:

        【解决方案4】:

        您可以使用已应用于网格视图行的 CSS 类来计算行数,例如

        var number = $('tr.dxgvDataRow').length;
        

        【讨论】:

          猜你喜欢
          • 2014-11-24
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多