private void ExpandGroupRowParent( CheckinGroupRow groupRow ) { if ( groupRow.Parent is CheckinGroupRow ) { ( (CheckinGroupRow)groupRow.Parent ).Expanded = true; } else if ( groupRow.Parent is CheckinAreaRow ) { ( (CheckinAreaRow)groupRow.Parent ).Expanded = true; } }
private void BuildCheckinGroupRow( Group group, Control parentControl, bool setValues ) { if ( group != null && !_groups.Contains( group.Guid ) ) { var checkinGroupRow = new CheckinGroupRow(); checkinGroupRow.ID = "checkinGroupRow_" + group.Guid.ToString( "N" ); checkinGroupRow.SetGroup( group ); checkinGroupRow.AddGroupClick += CheckinGroupRow_AddGroupClick; checkinGroupRow.DeleteGroupClick += CheckinGroupRow_DeleteGroupClick; parentControl.Controls.Add( checkinGroupRow ); if ( setValues ) { checkinGroupRow.Expanded = true; // _expandedRows.Contains( group.Guid ); checkinGroupRow.Selected = checkinGroup.Visible && _currentGroupGuid.HasValue && group.Guid.Equals( _currentGroupGuid.Value ); } foreach ( var childGroup in group.Groups .Where( g => g.GroupTypeId == group.GroupTypeId ) .OrderBy( a => a.Order ) .ThenBy( a => a.Name ) ) { BuildCheckinGroupRow( childGroup, checkinGroupRow, setValues ); } } }