|
|
|
|
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.
Subject |
Author |
Date |
|
Darren Oliver
|
May 1, 2007 - 11:56 AM
|
Hi Tech Support
I have a CExtGridWnd with a bunch of columns containing values, I would like to have a row above in the grid where I could have a single column span 4 columns. This would allow me to have a row where I could set titles and a row below with extra sub columns.
===================================== | Address | Gender | <-----header line 1 | city | state | zip code| <-----header line 2 ===================================== | AB | BC | CD | Male | <-----first row | GH | IJ | KL | Female | <-----second row =====================================
Is this possible to do in a CExtGridWnd or maybe possible in another type of grid window?
This would be a great feature to have so you could have a column that contains a person’s address and have the address broken down in the next row into street, city, etc. Allowing the entire address column to be hidden or displayed instead of having to manage a bunch of sub columns independently .
I hope I have explained this well enough. If not I can respond and clarify. (It’s possible to do this in Excel and Word)
Thank you tech support for all your help in the past, Darren
|
|
Darren Oliver
|
May 1, 2007 - 2:06 PM
|
Thank you for a quick response.
I think your solution for expanding a column overtop of the next column will work.
Is there a way to give a grid two header rows? I have tried adding a second row but I crash when I try to get the second row’s first cell as a CExtGridCellHeader.
Thanks again!
|
|
Technical Support
|
May 3, 2007 - 12:11 PM
|
The CExtGridWnd and CExtTreeGridWnd classes support multiple header rows and columns. You should invoke the CExtGridWnd::OuterRowCountTopSet() , CExtGridWnd::OuterRowCountBottomSet() , CExtGridWnd::OuterColumnCountLeftSet() and CExtGridWnd::OuterColumnCountRightSet() methods to specify the desired number of header rows/columns. The CExtGridWnd::GridCellGet() and CExtTreeGridWnd::ItemGetCell () methods allow you to instantiate grid cells in any area of the grid window. The CExtReportGridWnd class does not support multiple headers
|
|
Suhai Gyorgy
|
May 2, 2007 - 1:28 AM
|
OuterRowCountTopSet( 2 ); will add 2 header rows.
After that you can get the first cell of the second header row with
CExtGridCellHeader * pCell = STATIC_DOWNCAST( CExtGridCellHeader, m_wndGrid.GridCellGetOuterAtTop( 0L, 1L, RUNTIME_CLASS(CExtGridCellHeader) ) );
|
|
Technical Support
|
May 1, 2007 - 1:01 PM
|
This feature is not implemented yet but it is possible to change the location of grid cells to emulate span cells like it is demonstrated in this test project.
|
|