Print Page | Close Window

[CLOSE]: AllowColumnRemove(FALSE) has no effect

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=12804
Printed Date: 23 November 2024 at 5:55pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [CLOSE]: AllowColumnRemove(FALSE) has no effect
Posted By: mgampi
Subject: [CLOSE]: AllowColumnRemove(FALSE) has no effect
Date 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



Replies:
Posted By: mgampi
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net