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 » Change cell type Collapse All
Subject Author Date
Paul Cowan Jan 28, 2007 - 6:04 PM

How do I change the type of a cell? In the first column I have a combo box, the contents and type of the other cells in the row depend on the selection of the column 0 cell. When I try to cast the cell to a new type I’m getting an asert on AfxStaticDownCast.

Paul Cowan Jan 30, 2007 - 9:53 AM

Thanks, I now call CExtGridWnd::GridCellSet(NULL) before using CExtGridWnd::GridCellGet() for the new cell type and it works correctly.

Technical Support Jan 29, 2007 - 9:24 AM

Typically grid cells are instantiated inside the grid window automatically when you invoke CExtGridWnd::GridCellGet() (you specify the desired run-time class information when calling it). If you need to re-instantiate the grid cell at a particular position, you can use the CExtGridWnd::GridCellSet() method.