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 General Discussion » Bottom Cell Headers Collapse All
Subject Author Date
Henri Hein Aug 21, 2007 - 1:42 PM

I create a bottom row of cell headers with:

	OuterRowCountBottomSet(1, false);


I set the text with:

	CExtGridCellHeader * pCellBottom =
		STATIC_DOWNCAST(
			CExtGridCellHeader,
			GridCellGetOuterAtBottom(
				0L,
				0L,
				RUNTIME_CLASS(CExtGridCellHeader), false)
			); 
	if (pCellBottom)
		pCellBottom->TextSet("gugu-guchu");


My problem is, this also sets the top header.

How can I decouple the two so that I can have separate text in the top and bottom headers?

Henri Hein Aug 22, 2007 - 1:24 PM

Sorry, I’m using CExtReportGridWnd.

I am trying this in the ReportGrid_600 sample application.

Technical Support Aug 23, 2007 - 12:11 PM

Here is the beginning of the modified version of the CChildView::InitReportGridContent() method in the ReportGrid sample where we added the two lines marked with comments:

void CChildView::InitReportGridContent()
{
      ASSERT_VALID( this );
CRect rcOutput( 275, 100, 400, 200 );
CSplashWnd _splash( this, IDB_BITMAP_SPLASH, &rcOutput );

      ReportGroupAreaShow();
      ReportAutoPreviewModeSet( true, false );

      m_nBoldFontIndex = GridFontInsert( g_PaintManager->m_FontBold, -1, true );

INT nIconIndex = -1;
CExtCmdIcon _icon;
bool bInitiallyActive = true;
bool bInitiallyInactive = false;
INT nInitialColumnExtentSmall = 40;
INT nInitialColumnExtentNormal = 100;
INT nInitialColumnExtentBig = 250;
INT nInitialColumnExtentCheck = 22;
INT nInitialColumnExtentColor = 60;
INT nInitialColumnExtentNumber = 60;
INT nInitialColumnExtentCurrency = 60;
INT nInitialColumnExtentDateTime = 80;
CExtReportGridColumn * pRGC = NULL;
CTypedPtrList < CPtrList, CExtReportGridColumn * > _listColumns;

OuterRowCountBottomSet( 1L, false ); // !!!!!!! THIS LINE WAS ADDED !!!!!!!

      _splash.SetStatusText( _T("Registering columns ...") );
      // ProductName_ProductInformation
      pRGC =
            ReportColumnRegister(
                  _T("Name"),
                  _T("Main Information"),
                  bInitiallyActive,
                  false
                  );
      ASSERT_VALID( pRGC );
      pRGC->ExtentSet( nInitialColumnExtentNormal );
      _listColumns.AddTail( pRGC );
ReportGridCellGetOuterAtBottom( pRGC, 0L, RUNTIME_CLASS(CExtGridCellString) )->TextSet( _T("123") ); // !!!!!!! THIS LINE WAS ADDED !!!!!!!

      // ProductModelName_AdditionalInformation
. . .
If you run this sample application with modifications above, then you will see outer header row at the bottom and the "Name" column from the "Main Information" field group will display a string cell with the "123" text in outer header row at the bottom when it is active.

Technical Support Aug 22, 2007 - 12:39 PM

Please let us know which grid you are using: CExtReportGridWnd, CExtTreeGridWnd or CExtGridWnd? Is it possible to reproduce this problem using our sample applications?