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 General Discussion » Index of last inserted row in the grid Collapse All
Subject Author Date
Nitin Gahlaut Jun 7, 2010 - 7:52 AM

Hi,

I am using a Prof-UI’s grid control (derived from CExtReportGridWnd class).  In the grid I am adding data through CExtReportGridColumn’s object using SetItemText().


CDRGridCellString *l_pCellStr = (CDRGridCellString*)m_GridCtrl.ReportItemGetCell(m_pRGCLoc, l_pRGI, RUNTIME_CLASS(CDRGridCellString));

l_pCellStrLoc->SetItemText("Xyz", colorRef);


I want to know, is there any API which returns the index of last inserted row in the grid

If anybody knows then please let me know ASAP.


Thanks

Nitin

Technical Support Jun 7, 2010 - 11:19 AM

The CExtReportGridWnd report grid control is based on the CExtTreeGridWnd tree grid control The CExtReportGridItem* pointers can be used as HTREEITEM tree row handles. You can get plain row index of the CExtReportGridItem* report item using the CExtTreeGridWnd::ItemGetVisibleIndexOf() method. Please note, it’s not possible to get plain zero-based row index of tree/report rows which are under collapsed rows. The CExtTreeGridWnd::ItemGetVisibleIndexOf() method returns negative value in this case.