Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » How to get row count for shown and hidden rows. Collapse All
Subject Author Date
Eric Houvenaghel Apr 9, 2009 - 11:25 AM

I am using RowCountGet() to get the number of rows in CExtReportGridWnd.

However, this function will not include filtered (or hidden) rows.

Any idea on how to get the actual count.

i.e. Shown and hidden rows.

Technical Support Apr 9, 2009 - 12:15 PM

The CExtReportGridWnd report grid control is based on the CExtTreeGridWnd tree grid control. You should get access to the report tree data provider object first:

CExtReportGridWnd & wndRG = . . .
CExtReportGridDataProvider & _ReportDP = wndRG.GetReportData();

The report data provider manages report/tree grid rows, but internally it uses another instance of the CExtGridDataProvierMemory plain memory data provider containing all the rows in the expanded state and all the columns in the active state. You can get this memory cache of grid cells:
CExtGridDataProvider & _DP = _ReportDP._Tree_GetCacheDP(); 

This data provider is the real two dimensional storage of grid cells. It contains all the rows and columns of then report grid. First rows from the top are outer header rows at the top side of the report grid, next rows are the outer header rows at the bottom, next are data rows in the unfiltered and expanded state. The first header row at the top contains the CExtReportGridColumn grid cells. First column from the left is the tree structure column containing the CExtReportGridItem grid cells, next rows are header columns at the left side of the report grid, next are headers at the right side, next are the inactive report columns and, finally, next are the active report columns. We just hacked the report grid for you. The CExtGridDataProvider::RowCountGet() method can tell you the entire count of rows in the memory data provider. You should subtract the count of header rows from the top and bottom and you will get the entire un-filtered row count including report group rows.