Print Page | Close Window

removing items off a GroupBy area

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=3464
Printed Date: 29 April 2024 at 12:05am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: removing items off a GroupBy area
Posted By: Russ
Subject: removing items off a GroupBy area
Date Posted: 04 January 2006 at 3:58am
Hi,

I like the way removing off of items is done in the ReportSample. But I cannot achieve the same result in my view class inherited from CXTPReportView. And I cannot find any specific code in the sample that enables this functionality:

1. A black cross shown over the column's label when user drags and moves the label out of the GroupBy area.
2. removed column returns back to the control

I tried adding m_wndReport.ShowGroupBy() into sample's CTaskListView::OnCreate method. When I open Task Report sample it behaves exactly what I see in my own report view, i.e. it does not remove column's label off the groupBy area.

So what is the trick?

Thank you.



Replies:
Posted By: sserge
Date Posted: 04 January 2006 at 10:12am
Rouslan,

Please ensure you call Populate() method after changing GroupBy structure.

Following piece of code inserted into the end of CTaskListView::OnCreate method works fine for me:

wndReport.ShowGroupBy();
CXTPReportColumn* pCol = wndReport.GetColumns()->Find(COLUMN_STATUS);
wndReport.GetColumns()->GetGroupsOrder()->Clear();
wndReport.GetColumns()->GetGroupsOrder()->Add(pCol);
wndReport.Populate();


--
HTH,
Serge


Posted By: Russ
Date Posted: 04 January 2006 at 10:36am
I did try that but no luck. but I also tried to use this

m_wndReport.GetReportHeader()->AllowColumnRemove(TRUE);

this solved the first half of the problem. Now i can see the black cross when move the label outside of the GroupBy area..

Is there any way to have the removed column header to go back to the control. Maybe I could intercept something somewhere :) and add the column being removed back to the report control.


Thank you

PS: I am using xtp 9.51.
PSS: Сергей, что есть "НТН"? :)


Posted By: sserge
Date Posted: 04 January 2006 at 1:05pm
Wow, sorry, you should have started from the version you're using...

1) This option had an inverse default value previously :)

2) Little bit more details please if possible. Which action causes a removed column return?

pps: HTH = Hope that helps  ;-)

--
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