![]() |
SOLVED: UnrestrictedDragDrop & RecordsDropped |
Post Reply ![]() |
Author | |
McKloony ![]() Senior Member ![]() ![]() Joined: 09 January 2007 Location: Germany Status: Offline Points: 340 |
![]() ![]() ![]() ![]() ![]() Posted: 02 March 2010 at 2:49am |
If the RC is UnrestrictedDragDrop = True and you drop a record not among a sibling child records, it comes to an error message if you want to read TargetRecord properties. So how I can find out, if a user dops among a sibling child records or not?
|
|
Product: Xtreme SuitePro (ActiveX) 16.2.5
Platform: XP / Windows 7 Language: Visual Basic 6.0 SP6 |
|
![]() |
|
McKloony ![]() Senior Member ![]() ![]() Joined: 09 January 2007 Location: Germany Status: Offline Points: 340 |
![]() ![]() ![]() ![]() ![]() |
It seems to be a Bug in 13.3.0 the UnrestrictedDragDrop takes no different if it is True or False. It is alwas True!
|
|
Product: Xtreme SuitePro (ActiveX) 16.2.5
Platform: XP / Windows 7 Language: Visual Basic 6.0 SP6 |
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
UnrestrictedDragDrop is set by you to True or False. Default is False.
After looking through the source: ReportControl.UnrestrictedDragDrop = False If the Target Record is a child record the parent record will be reported as the target. ReportControl.UnrestrictedDragDrop = True If the Target Record is a child record the child record will be reported as the target. Since it is a child record you will need to support in your app the specific actions to take with the child record. |
|
![]() |
|
McKloony ![]() Senior Member ![]() ![]() Joined: 09 January 2007 Location: Germany Status: Offline Points: 340 |
![]() ![]() ![]() ![]() ![]() |
If ReportControl.UnrestrictedDragDrop = False there is an error message if I try to read the read TargetRecord properties !!!
|
|
Product: Xtreme SuitePro (ActiveX) 16.2.5
Platform: XP / Windows 7 Language: Visual Basic 6.0 SP6 |
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
Do you use OLEDragDrop?
|
|
![]() |
|
McKloony ![]() Senior Member ![]() ![]() Joined: 09 January 2007 Location: Germany Status: Offline Points: 340 |
![]() ![]() ![]() ![]() ![]() |
Yes, the RC has also OLEDragDrop set to true! |
|
Product: Xtreme SuitePro (ActiveX) 16.2.5
Platform: XP / Windows 7 Language: Visual Basic 6.0 SP6 |
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
Can I see code you use to check to check it?
|
|
![]() |
|
McKloony ![]() Senior Member ![]() ![]() Joined: 09 January 2007 Location: Germany Status: Offline Points: 340 |
![]() ![]() ![]() ![]() ![]() |
|
|
Product: Xtreme SuitePro (ActiveX) 16.2.5
Platform: XP / Windows 7 Language: Visual Basic 6.0 SP6 |
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
I think maybe you don't understand what this property is used for. In your sample UnrestrictedDragDrop will do nothing as the records don't have any child records. In the sample the Group Rows have child rows, but the records attached to these rows do not have children.
And of course TargetRecord will be Nothing if you don't drop over a row. You just have to test for it. Here is one way to see if the record you dropped was dropped in the group it will appear. Hope this helps Private Sub repCont5_DropRecordsEx(ByVal TargetRecord As XtremeReportControl.IReportRecord, ByVal Records As XtremeReportControl.IReportRecords, ByVal Above As Boolean) If Not TargetRecord Is Nothing Then Dim tRecord As XtremeReportControl.ReportRecord Debug.Print TargetRecord(2).Value For Each tRecord In Records If TargetRecord(4).GroupCaption = "" Then If TargetRecord(4).Caption = tRecord(4).Caption Then Debug.Print "5 - Sibling! : " + TargetRecord(2).Value + " - " + TargetRecord(4).Caption MsgBox "5 - Sibling! : " + TargetRecord(2).Value + " - " + TargetRecord(4).Caption Exit Sub End If Else If TargetRecord(4).GroupCaption = tRecord(4).GroupCaption Then Debug.Print "5 - Sibling! : " + TargetRecord(2).Value + " - " + TargetRecord(4).Caption Debug.Print "5 - Sibling! : " + TargetRecord(2).Value + " - " + TargetRecord(4).Caption Exit Sub End If End If Next MsgBox "5- NO SIBLINGS! " + TargetRecord(2).Value + " - " + TargetRecord(4).Caption Else MsgBox "repCont5_DropRecordsEx NOT DROPPED AMONG ROWS!" End If End Sub |
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
Did that help?
|
|
![]() |
|
McKloony ![]() Senior Member ![]() ![]() Joined: 09 January 2007 Location: Germany Status: Offline Points: 340 |
![]() ![]() ![]() ![]() ![]() |
Yes, it's solved! Thanks.
|
|
Product: Xtreme SuitePro (ActiveX) 16.2.5
Platform: XP / Windows 7 Language: Visual Basic 6.0 SP6 |
|
![]() |
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 |