SMART datagrid v.1 > Examples

[ grids ver.1.3.6]   Back  Forward

Row Counts  Example

The number of Grid Rows displayed in the grid can be known through several property values. 

GridBase.rowCount is the number of all rows, including the ones not displayed in the screen as scrolled, and excluding the ones hidden since the group row has been collapsed. The group header and footer are also included in the number. If the number is changed, GridBase.onRowCountChanged event will be fired. 

displayRowCount is the number of grid rows displayed in the current screen. GridBase.fullDisplayRowCount is the number of rows displayed entirely. It can be the same or one less than displayRowCount. 

descendantRowCount is the number including descendant rows of the group row which has been collapsed in rowCount. If the number is changed, onDescendantRowCountChanged event will be fired. 

descendantDataCount is the number of Data Rows or Tree Rows which are connected to the row of the data set. It is the number including the descendant rows of the collapsed group rows or tree rows. If the number is changed, onDescendantDataCountChanged event will be fired. 

In the grid below, you can do the row grouping, and can check the change state of each number by expanding or hiding the group row or adding or deleting the rows. 

Grid - 1
dataset rows

The values transferred to the number event are displayed below. 

rowCount
displayRowCount
descendantRowCount
descendantDataCount

Get the property value of each number and display it on the right side of the corresponding location in red. 

View Source JSP 

See Also
GridBase.rowCount
GridBase.displayRowCount
GridBase.fullDisplayRowCount
GridBase.onRowCountChanged
GridBase.onDisplayRowCountChanged
Examples
Tree Row Counts