Problem with drag/drop
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=10981
Printed Date: 26 November 2024 at 8:06pm Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: Problem with drag/drop
Posted By: danpetitt
Subject: Problem with drag/drop
Date Posted: 10 June 2008 at 5:16pm
I have AfxOleInit in app InitInstance, I have called in my docview::initinstance:
wndReport.EnableDragDrop( _T("BuildITTask:v2"), xtpReportAllowDrag | xtpReportAllowDrop ); |
When I drag I get the standard cursor with a little box under it ... but I do not get the red line between the rows.
Any reason for this? Could anyone help.
|
Replies:
Posted By: danpetitt
Date Posted: 11 June 2008 at 3:18pm
In fact I dont get either of the drag/drop notifications called as per ReportSample:
ON_NOTIFY(XTP_NM_REPORT_BEGINDRAG, XTP_ID_REPORT_CONTROL, OnReportBeginDrag)
ON_NOTIFY(XTP_NM_REPORT_DROP, XTP_ID_REPORT_CONTROL, OnReportDrop)
|
Help, please ... oh, I am running v10.3.1
|
Posted By: danpetitt
Date Posted: 11 June 2008 at 4:42pm
Found it, I had to clear the group and sort by order arrays (even though they are disabled) when I initialise my view. Now I have drag/drop, my messages are being received and the red drop marker is being drawn. Hurrah!
For anyone else, if you load/save state, call these two after adding columns and loading the state if you dont actually want groupby and column sorting (as you cant have drag/drop with column sort/grouping):
CXTPReportControl &wndReport = GetReportCtrl();
wndReport.GetColumns()->GetGroupsOrder()->Clear();
wndReport.GetColumns()->GetSortOrder()->Clear(); |
|
|