src/Misc/EFTools/DesignXmlCore/VirtualTreeGrid/Provider/VirtualTree.cs
/// <summary>
///     Returns the expanded list at the given index if one already exists. This method
///     will throw an exception if IsExpanded for this cell is false. Use ToggleExpansion
///     to create a new expansion.
/// </summary>
/// <param name="row">The row coordinate</param>
/// <param name="column">The column coordinate</param>
/// <returns>The branch and level of the expansion at the given location</returns>
Returns the expanded list at the given index if one already exists. This method
will throw an exception if IsExpanded for this cell is false. Use ToggleExpansion
to create a new expansion.
Returns the expanded list at the given index if one already exists . This method will throw an exception if IsExpanded for this cell is false . Use ToggleExpansion to create a new expansion .
protected ExpandedBranchData GetExpandedBranch(int row, int column)
        {
            if (myRootNode != null)
            {
                if (row < 0)
                {
                    if (column > 0)
                    {
                        throw new ArgumentOutOfRangeException(
                            "column", VirtualTreeStrings.GetString(VirtualTreeStrings.ColumnOutOfRangeException));
                    }
                    return new ExpandedBranchData(myRootNode.Branch, 0);
                }
                else
                {
                    var pos = TrackCell(row, ref column);
                    if (!pos.IsBlank(column))
                    {
                        var tnCur = pos.ParentNode.GetChildNode(pos.Index);
                        if (tnCur != null)
                        {
                            if (column > 0)
                            {
                                if (pos.SubItemOffset == 0
                                    &&
                                    column < pos.ParentNode.GetColumnCount(pos.Index))
                                {
                                    var sn = tnCur.SubItemAtColumn(column);
                                    if (sn != null)
                                    {
                                        return new ExpandedBranchData(sn.RootNode.Branch, 0);
                                    }
                                }
                            }
                            else if (tnCur.Expanded)
                            {
                                return new ExpandedBranchData(tnCur.Branch, pos.Level);
                            }
                        }
                    }
                }
            }
            throw new ArgumentOutOfRangeException("row"); 
        }
protected ExpandedBranchData GetExpandedBranch ( int row , int column ) { if ( myRootNode != null ) { if ( row < 0 ) { if ( column > 0 ) { throw new ArgumentOutOfRangeException ( " " , VirtualTreeStrings . GetString ( VirtualTreeStrings . ColumnOutOfRangeException ) ) ; } return new ExpandedBranchData ( myRootNode . Branch , 0 ) ; } else { var pos = TrackCell ( row , ref column ) ; if ( ! pos . IsBlank ( column ) ) { var tnCur = pos . ParentNode . GetChildNode ( pos . Index ) ; if ( tnCur != null ) { if ( column > 0 ) { if ( pos . SubItemOffset == 0 && column < pos . ParentNode . GetColumnCount ( pos . Index ) ) { var sn = tnCur . SubItemAtColumn ( column ) ; if ( sn != null ) { return new ExpandedBranchData ( sn . RootNode . Branch , 0 ) ; } } } else if ( tnCur . Expanded ) { return new ExpandedBranchData ( tnCur . Branch , pos . Level ) ; } } } } } throw new ArgumentOutOfRangeException ( " " ) ; }
Returns the expanded list at the given index if one already exists.
Returns the expanded list at the given index if one already exists .
//UNDONE: EXCEPTION, different exception for not parent object??
The branch and level of the expansion at the given location
The branch and level of the expansion at the given location
row
int
The row coordinate
The row coordinate
column
int
The column coordinate
The column coordinate