Print Page | Close Window

FEATURE REQ: AllowExpandCollapse & BeforeExpanded

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=16304
Printed Date: 15 November 2024 at 8:32am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: FEATURE REQ: AllowExpandCollapse & BeforeExpanded
Posted By: jpbro
Subject: FEATURE REQ: AllowExpandCollapse & BeforeExpanded
Date 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




Replies:
Posted By: jpbro
Date 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



Posted By: Aaron
Date 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....



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net