【发布时间】:2011-07-26 22:55:05
【问题描述】:
在System.Windows.Forms.DataGridView 中是DataGridView.Rows.Count。但是如何获取 Dev Express GridView 的行数?
【问题讨论】:
标签: c# winforms devexpress xtragrid
在System.Windows.Forms.DataGridView 中是DataGridView.Rows.Count。但是如何获取 Dev Express GridView 的行数?
【问题讨论】:
标签: c# winforms devexpress xtragrid
您需要在GridView 中获取View,然后访问RowCount 属性
【讨论】:
yourGridNameView.ViewData.RowCount
在 Dev Express 中有一个 Grid Control 并且在这个 grid control 里面有一个视图,所以你可以使用 gridview.rowcount 属性获取gridview中的行数。
【讨论】:
Dim rowCount As Integer = 0 '''declare rowCount as integer to hold the count value
GridView.RowCount = rowCount '''//Now assign the the count to rowCount
【讨论】:
您可以使用已应用于网格视图行的 CSS 类来计算行数,例如
var number = $('tr.dxgvDataRow').length;
【讨论】: