Print Page | Close Window

Can I Force a Column to be Grouped?

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=3400
Printed Date: 23 November 2024 at 8:29am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Can I Force a Column to be Grouped?
Posted By: EricM
Subject: Can I Force a Column to be Grouped?
Date Posted: 12 December 2005 at 8:31pm

Is it possible to force a specific column to be grouped?  I can "suggest" that the column be grouped using the following code:

{

CXTPReportColumn *pColumn = m_wndReport.AddColumn(new CXTPReportColumn(0, _T("Test Column"), 50));

CXTPReportColumns *pColumns = m_wndReport.GetColumns();

CXTPReportColumnOrder *pColumnOrder = pColumns->GetGroupsOrder();

pColumnOrder->InsertAt(0, pColumn);

pColumn->SetVisible(FALSE);

}

But doing this only starts the control off with the grouping, it doesn't deny users from subsequently removing the grouping.  Can I turn off the ability to remove just this column from the grouping.  (i could turn it all off by hiding the GroupBy header, but I don't want to do that).

Thanks,

E




Replies:
Posted By: sserge
Date Posted: 13 December 2005 at 4:44pm
Hi Eric,

See ReportColumn methods Set(Is)Groupable, Set(Is)Sortable. They could probably help you.

Also, if you’re adding a custom column which is derived from standard CXTPReportColumn, you can set the internal member m_bAllowDrag to FALSE for this column. It will prevent it from being dragged from the Group By header. But note that it would also prevent it from being dragged from its place on the Report header.

--
WBR,
Serge



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