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 » In CExtGird, I want to realize Copy&Paste Collapse All
Subject Author Date
tera t Aug 1, 2007 - 3:50 AM

Hello

If there are samples, please teach it

Technical Support Aug 1, 2007 - 11:33 AM

Please let us know which parts of the grid control should be copied/pasted? One grid cell only? Full rows/columns? All the selected grid cells?

Technical Support Aug 1, 2007 - 11:35 AM

The grid window is designed as a general purpose control for displaying table like data, where each cell object is an instance of some cell class which keeps its specific data and implements its behavior. The grid window knows nothing about which kind of data is stored in cell objects and which behavior they implement. So, that is why we did not include built-in copy/paste API. All the grid cells support run-time type information, serialization, cloning and assignment features. These features make them ready for the copy/paste operation, but generally the grid window is unable to know whether the pasted cells should replace instances of existing cells independently from cell types or whether the data type conversion should be performed instead. This is a very important detail because some particular grid may need to keep cells of appropriate type in some columns and/or rows.

If you need simply copy/paste the cell’s text, we think it can be implemented locally in your application. You need to walk through the selected cells and invoke the TextGet()/TextSet() method for each of them according to the format of the data in the clipboard.