![]()  | 
 
How to determine the group level of a focused row | 
 
    Post Reply  
   | 
  
| Author | |
   
   Peter59  
   
   Groupie  
   Joined: 19 July 2007 Status: Offline Points: 61  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: How to determine the group level of a focused rowPosted: 15 May 2008 at 10:37am  | 
 
| 
   
    
   Hi,  
   
  is there a way to determine the group level and the index of the grouped column of a focused row for example in the SelectionChanged event? Something like that: Sub ReportControl_SelectionChanged() If ReportControl.FocusedRow.GroupRow Then Msgbox "GroupLevel="; [Grouplevel] Msgbox "ColumnIndex="; [Index of grouped column] End If Any ideas? Thanks, Peter  | 
 |
![]()  | 
 |
   
   Peter59  
   
   Groupie  
   Joined: 19 July 2007 Status: Offline Points: 61  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 15 May 2008 at 2:56pm | 
 
| 
   
    
   An approach for determining the group level 
   
  Sometimes it is a good idea to write a problem down (or to post it) and to pause for a while... ![]() My approach to determine the group level is current an iteration "upwards" through all ParentRows until ParentRow points to Nothing. Counting the steps will result in the group level. Sub ReportControl_SelectionChanged() Dim rptRow as ReportRow Dim iLevel as Integer If ReportControl.FocusedRow.GroupRow Then iLevel = 1 Set rptRow = .ParentRow Do Until rptRow Is Nothing Set rptRow = rptRow.ParentRow iLevel = iLevel + 1 Loop Msgbox "GroupLevel="; iLevel Msgbox "ColumnIndex="; [Index of grouped column] End If Is there maybe a way to get the level in a better (shorter) way? But how to get the index of the grouped column? No ideas? Peter  | 
 |
![]()  | 
 |
   
   Aaron  
   
   Senior Member  
   Joined: 29 January 2008 Status: Offline Points: 2192  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 15 May 2008 at 11:08pm | 
 
| 
   
    
   Hi, 
 
   
  The found grouplevel could be used to determine the index of the column: 
wndReportControl.GroupsOrder(iLevel - 1).Index 
    | 
 |
| 
   
     
     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....  | 
 |
![]()  | 
 |
    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  |