Professional UI Solutions
Site Map   /  Register


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 » Copy / paste cells in CExtGridWnd Collapse All
Subject Author Date
Bart Kampers May 27, 2009 - 8:41 AM

The CExtFormulaGridWnd has nice copy/paste features. Is it also possible to use these in the CExtGridWnd?


Kind regards,



Technical Support May 27, 2009 - 1:11 PM

There are two grid-related features demonstrated in the new FormulaGrid sample application:

- Formula calculations, watching and tracking. These features are related to the new CExtFormulaGridWnd class only.

- Everything else including clipboard and drag-and-drop. This is related to the improved version of the CExtGridWnd class and the new CExtGR2D class which describes abstract ranges of grid cells of any complexity.

The CExtGridWnd class automatically supports standard key combinations related to the clipboard actions. You should invoke the following code to enable the clipboard support:

CExtGridWnd & wndGrid = . . .
wndGrid.m_dwSupportedAccelCommands |= __EGSA_COPY|__EGSA_CUT|__EGSA_PASTE;
The new clipboard support feature in the CExtGridWnd grid control works with both unique grid’s data format and plain ANSI/UNICODE text formats. So, you can copy/paste data between Prof-UIS grid and Windows NOTEPAD.EXE and other text editors. If the Prof-UIS specific clipboard data is available, the paste data is not only grid cell values, it’s the cell objects with unique type and behavior.

If you need to enable dragging and/or dropping in the grid control, tyou should apply the new __EGWS_ADV_ENABLE_DATA_DND_DRAG and/or __EGWS_ADV_ENABLE_DATA_DND_DROP styles using the new CExtGridWnd::AdvModifyStyle() method. The new CExtGridWnd::OnGridQueryClipboardFormat() and CExtGridWnd::OnGridQueryClipboardFormatName() methods can be used for providing the grid control with unique clipboard format which is specific for your application.