How to get the number of elements in a datagrid

I am using Datagrid control in flex.

I need to get the number of elements in this datagrid. What is the way to get this?

+3
source share
1 answer

You can find the number of items by checking the data provider for the data grid:

var count:Number = (myDataGrid.dataProvider as ICollectionView).length;

In the documentation, the data sources assigned to the data provider already implement ICollectionView, and if not, they change to a class that implements ICollectionView.

+6
source

Source: https://habr.com/ru/post/1756533/


All Articles