Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - FEATURE REQ: AllowExpandCollapse & BeforeExpanded
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

FEATURE REQ: AllowExpandCollapse & BeforeExpanded

 Post Reply Post Reply
Author
Message
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Topic: FEATURE REQ: AllowExpandCollapse & BeforeExpanded
    Posted: 27 February 2010 at 1:38pm
I'm encountering a number of problems when trying to control when groups can be expanded/collapsed by the user. For example, even though I am canceling expansion changed in the RowExpanded method (and it works when the user double-clicks groups), it partially fails when the user presses the Left Arrow key (the selection & focus disappears sometimes, sometimes it moves to the top child row, even though the group remains expanded).

I think we need two features added to give us complete control of expand/collapse:

  1. AllowUserRowExpandCollapse - When True, users can expand/collapse rows by double-clicking them, or by clicking the glyph, or by pressing the left/right arrow keys). When False, users cannot expand/collapse rows under any of the previously mentioned circumstances, and the +/- glyphs are hidden from view.
  2. BeforeRowExpandChanged(Row As XtremeReportControl.IReportRow, Cancel As Boolean) - Fired before any row is expanded or collapsed. Setting the Cancel property to TRUE would cancel the expansion/collapse of the row

Some additional thoughts on #1 - maybe it would be better to be a mask of values - None, GroupRows, NonGroupRows. So you could turn off collapsing for grouprows but still allow it for regular tree-view rows? Or are tree view rows treated differently than group rows? I haven't used tree view features yet.

Any thoughts?
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2010 at 2:49pm
It might be better if we could have finer control over the +/- glyphs than just on or off. Using my autocollapsing groups demo as an example, it makes sense to keep showing the expand glyph, but hide the collapse glyph (since the user can't collapse a group).

So maybe:


  1. ShowGroupRowCollapseGlyph = Boolean. When False, the - glyph is not shown.
  2. ShowGroupRowExpandGlyph = Boolean. When false, the + glyph is not shown.
If both ShowGroupRowCollapseGlyph and ShowGroupRowExpandGlyph are FALSE, then the left margin of the group text should collapse to the left (since no glyphs will be shown, let's not leave space for them).

If either of the two properties are TRUE, then the left margin should be preserved for the group rows where the property = FALSE.

For example:

ShowGroupRowCollapseGlyph = FALSE and ShowGroupRowExpandGlyph = TRUE


Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 22 March 2010 at 3:59pm
Hi Jason,
 
It would be easier with these two properties but you could also use BeforeDrawRow event:
 
Private Sub ReportControl1_BeforeDrawRow(ByVal Row As XtremeReportControl.IReportRow, ByVal Item As XtremeReportControl.IReportRecordItem, ByVal Metrics As XtremeReportControl.IReportRecordItemMetrics)
    If Row.GroupRow Then
        If Row.Expanded Then
            Metrics.GroupRowIcon = 6
            Metrics.GroupRowIconAlignment = xtpGroupRowIconBeforeText
        End If
    End If
End Sub
 
I tried with your DEMO SingleExpandGroup and it works  You have to remove plus/minus icons and assign Metrics.GroupRowIcon (and CJ fixes the Glyphs icons problem) you can use this instead.  
 
But I will add the requests to my list anyway, maybe CJ is in a good mood and will add these as well
 
 
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....
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.219 seconds.