Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - [CLOSE]: AllowColumnRemove(FALSE) has no effect
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[CLOSE]: AllowColumnRemove(FALSE) has no effect

 Post Reply Post Reply
Author
Message
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Topic: [CLOSE]: AllowColumnRemove(FALSE) has no effect
    Posted: 26 November 2008 at 11:05am
Hi;
I created a report control and set it up as shown below:

bool CXRReportSchedulerReportCtrl::SetupControl() {
    CString strCaption;

    ShowGroupBy(FALSE);
    GetReportHeader()->AllowColumnRemove(FALSE);
    GetReportHeader()->AllowColumnReorder(FALSE);


    ASSERT(GetColumns()->GetCount()==0);

    // Active-Flag (Index 0 as Icon)
    CXTPReportColumn* pColumn=AddColumn(new CXTPReportColumn(0, strCaption, 20, FALSE, XTP_REPORT_NOICON, FALSE));
    ASSERT(pColumn!=0);
    pColumn->SetGroupable(FALSE);

    // Description
 
    pColumn=AddColumn(new CXTPReportColumn(1, _T("Bezeichnung")/*strCaption*/, 200));
    ASSERT(pColumn!=0);
    pColumn->SetGroupable(FALSE);

    // Typ
    pColumn=AddColumn(new CXTPReportColumn(2, _T("Zeitplantyp")/*strCaption*/, 100));
    ASSERT(pColumn!=0);
    pColumn->SetGroupable(FALSE);

    pColumn=AddColumn(new CXTPReportColumn(3, _T("Startzeitpunkt")/*strCaption*/, 100));
    ASSERT(pColumn!=0);
    pColumn->SetGroupable(FALSE);

    GetPaintManager()->SetColumnStyle(xtpReportColumnExplorer);
    GetPaintManager()->SetGridStyle(TRUE, xtpReportGridNoLines);

    FocusSubItems(FALSE);

    VERIFY(images_.Create(16,16, ILC_COLOR32|ILC_MASK, 0, 1));
    CBitmap bmp;
    VERIFY(bmp.LoadBitmap(IDB_SCHEDULER_REPORT_ITEMS));
    images_.Add(&bmp, RGB(255, 255, 255));
    SetImageList(&images_);

    return true;

}


After that I'm able to remove columns by mouse dragging. What's going on here? I checked whether AllowColumnRemove() will be called elsewhere, but this isn't the case...

So what did I miss?
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2008 at 11:11am
Hi;
My fault: I forgot to remove the XML property file after setting AllowColumnRemove(FALSE)
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.