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 Insert a row in CExtReportGridWnd? Collapse All
Subject Author Date
Chris Anderson Jul 5, 2007 - 11:14 AM

In CExtReportGridWnd, the ReportItemRegister() always adds the row at the end. How could I insert a row at the given index in CExtReportGridWnd?

Thanks

Chris Anderson Jul 6, 2007 - 11:54 AM

Thanks. I have used CExtTreeGridWnd::ItemInsert()

Technical Support Jul 6, 2007 - 7:25 AM

The CExtReportGridWnd class displays a sorted/grouped set of report items (rows). Each new row is inserted at the end of report grid (i.e. it is appended) regarldes of the currently applied sorting/grouping rules. You should invoke the CExtReportGridWnd::ReportSortOrderUpdate() method after inserting one or more report items and all the new items will be moved to their correct locations. If you are not using sorting/grouping at all, it may be reasonable to switch to using CExtGridWnd instead because it is faster. You can also disable grouping in report grid control and use APIs of the CExtTreeGridWnd class for inserting tree items into exactly needed locations (the CExtTreeGridWnd::ItemInsert() method).