How to trigger changes in row and column dimensions

Discussion forum for PivotCube VCL users. Common questions. Bug and problem reports

Moderator: Alex Zencovich

How to trigger changes in row and column dimensions

Postby velislav » Tue Jun 23, 2009 1:31 pm

Hi,
What I wanna do is to know when the user changes the rows or columns in the Map by dragging an item from/to PVTDimToolBar to/from TPVRowToolBar(TPVColToolBar). {and of course to cancel dropping if needed}
I've put event handlers to PVRowToolBar.OnDropDown and PVRowToolBar.OnExtDropDown but they are never called. Why?

And my second question is what is the difference btn ondropdown and onEXTdropdown.
velislav
User
 
Posts: 5
Joined: Tue Jun 23, 2009 1:16 pm

Re: How to trigger changes in row and column dimensions

Postby AlexZencovich » Tue Jun 23, 2009 3:34 pm

OnDropDown fired when you click on small arrow button on dimension/measure item and drop-down control opened. It may be used to override drop-down form with your own form

OnExtDropDown fired when you click on small button on toolbar itself to open Measure manager (currently supported for measures only as dimensions have no such buttons)
Best regards,

Alex Zencovich
-------------------------------------------------------------------------------------------------------------------------------------------
www.pivotcube.com - OLAP solution for Delphi, C++ Builder and ActiveX environment
AlexZencovich
Site Admin
 
Posts: 580
Joined: Sun Jun 18, 2006 10:09 am

Re: How to trigger changes in row and column dimensions

Postby velislav » Tue Jun 23, 2009 10:36 pm

Ok, I understand these 2 events now.

But the first question stays unsolved.
I explain in details :
Suppose whe have a form with a cube, map, grid, dimtoolbar, rowtoolbar , coltoolbar connected alltogether is a sinle logic unit. The cube is already built and not all dimension are visible in the grid (so there is a button in the dimtoolbar).
Now suppose the user (1) clicks on a dimension-captioned button on DimToolBar and holding down the mouse button, (2) drags it(the button) over a RowToolBar and finally (3) releases the mouse button i.e. drops the button in the RowToolBar.
As a result to the three operations a new dimension is added to the rows.
The question is how , as a programmer, I can know what happened (from step (1) to (3)) i.e. what events occurred
and of course how can i cancel by code three steps if I need to do this restriction.
At moment (3) I wanna know which dimension is being dropped over RowToolBar. What is the way to satisfy my curiosity ;-)
velislav
User
 
Posts: 5
Joined: Tue Jun 23, 2009 1:16 pm

Re: How to trigger changes in row and column dimensions

Postby AlexZencovich » Wed Jun 24, 2009 4:47 am

You have to use OnDragDrop event to check that

TDragDropEvent = procedure(Sender: TObject; Index : integer; var Apply : boolean) of object;

where Index is Index of dimension/measure in TPivotMap.Dimensions/Measures (RealIndex in measures)

set Apply to False to disable action
Best regards,

Alex Zencovich
-------------------------------------------------------------------------------------------------------------------------------------------
www.pivotcube.com - OLAP solution for Delphi, C++ Builder and ActiveX environment
AlexZencovich
Site Admin
 
Posts: 580
Joined: Sun Jun 18, 2006 10:09 am

Re: How to trigger changes in row and column dimensions

Postby velislav » Wed Jun 24, 2009 9:15 am

10x a lot

this solves my problem
velislav
User
 
Posts: 5
Joined: Tue Jun 23, 2009 1:16 pm


Return to PivotCube VCL

Who is online

Users browsing this forum: No registered users and 6 guests

cron