Can I Force a Column to be Grouped? |
Post Reply |
Author | |
EricM
Newbie Joined: 12 December 2005 Status: Offline Points: 3 |
Post Options
Thanks(0)
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 |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |