[SOLVED] ColumnOrderChangedEx event |
Post Reply |
Author | |
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
Posted: 21 February 2009 at 2:41pm |
Hi,
Reason in ColumnOrderChangedEx event returns incorrect values.
for example:
xtpReportColumnHidden = 1025 (should be 1024)
xtpReportColumnShown = 513 (should be 512)
Looks like:
0 <> 2048 +1
2049 <> 4096 +2
.............................
Please look into it
Thanks
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
enum XTPReportColumnOrderChangedReason{ xtpReportColumnChangeOther = 0x0000, // Neither column order nor group order is changed.xtpReportColumnOrderChanged = 0x0001, // Column order changed.xtpReportColumnGroupOrderChanged = 0x0002, // Group order changed.xtpReportColumnOrderChangedMask = 0x000F, // A mask for order change flags.xtpReportColumnAdded = 0x0010, // A column is added to the column list.xtpReportColumnRemoved = 0x0020, // A column is removed from the column list.xtpReportColumnPropExchange = 0x0040, // The column properties changed during properties exchange procedure.xtpReportColumnCaptionChanged = 0x0080, // The column caption is changed.xtpReportColumnWidthChanged = 0x0100, // The column width is changed.xtpReportColumnShown = 0x0200, // A column visibility property is changed to "visible".xtpReportColumnHidden = 0x0400, // A column visibility property is changed to "hidden".xtpReportColumnMoved = 0x0800, // A column is moved.xtpReportColumnAddedToGroupby = 0x1000, // A column is added to the GroupBy box.xtpReportColumnRemovedFromGroupby = 0x2000, // A column is removed from the GroupBy box.xtpReportColumnAddedToFieldChooser = 0x4000, // A column is added to the Field Chooser.xtpReportColumnRemovedFromFieldChooser = 0x8000, // A column is removed from the Field Chooser.xtpReportColumnChangeMask = 0xFFF0, // A mask for column change flags.}; |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
1025 = 1024 + 1 === xtpReportColumnHidden | xtpReportColumnOrderChanged - this is i get running your test. It's right
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
OK, but then I have another question for you:
Just remove one column (drag column from header) and you get two events:
Thanks
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Right - too many notifications.
btw - easy to test with code
Set recItem = rec.AddItem("Caption: " & Column.Caption & " - " & "Reason: " & Hex$(Reason))
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Also groupbox notifications will be thrown in ColumnOrderChangedEx. If you would use both events (ColumnOrderChangedEx and GroupOrderChangedEx) you get 2 notifications of same event.
To test:
Thank you |
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
You need to decode the received notification - group-related have own ids so it is easy to recognize: xtpReportColumnAddedToGroupby = 0x1000, // A column is added to the GroupBy box.
xtpReportColumnRemovedFromGroupby = 0x2000, // A column is removed from the GroupBy box. btw - you had 2 events in your posted case: 1st - column hide in table and columns order changed as result
2nd - column add in group row and group row order changed as result
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi Mark,
That's what I said. Why is Groupbox notification in ColumnChangedEx event. The GroupOrderChangedEx event covers this already, now you have same event TWICE
This post is just a remark on these events and how they are implemented. Leave it for now... You can't change it anymore so why bother...
Thanks
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Cause GroupBox deals with columns and columns order.
There are two events here - one on GroupBox, one - on Header columns set.
You can use or not this notificaction. This is logical. Why should I change?
|
|
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 |