src/Misc/EFTools/DesignXmlCore/VirtualTreeGrid/Provider/VirtualTree.cs
/// <summary>
///     Get the parent index of the given row and column
/// </summary>
/// <param name="row">The row coordinate</param>
/// <param name="column">The column coordinate</param>
/// <returns>Returns the parent index, or -1 if the parent is the root list</returns>
Get the parent index of the given row and column
Get the parent index of the given row and column
protected int GetParentIndex(int row, int column)
        {
            var parentOffset = 0;
            var singleColumnSubItemAdjust = 0;
            var pos = TrackCell(row, ref column, ref parentOffset, ref singleColumnSubItemAdjust);
            if (pos.ParentAbsolute == VirtualTreeConstant.NullIndex)
            {
                if (!pos.ParentNode.SubItemRoot
                    || pos.ParentNode.ComplexSubItem)
                {
                    return VirtualTreeConstant.NullIndex;
                }
            }
            return pos.ParentAbsolute + parentOffset;
        }
protected int GetParentIndex ( int row , int column ) { var parentOffset = 0 ; var singleColumnSubItemAdjust = 0 ; var pos = TrackCell ( row , ref column , ref parentOffset , ref singleColumnSubItemAdjust ) ; if ( pos . ParentAbsolute == VirtualTreeConstant . NullIndex ) { if ( ! pos . ParentNode . SubItemRoot || pos . ParentNode . ComplexSubItem ) { return VirtualTreeConstant . NullIndex ; } } return pos . ParentAbsolute + parentOffset ; }
Get the parent index of the given row and column
Get the parent index of the given row and column
Returns the parent index, or -1 if the parent is the root list
Returns the parent index or - 1 if the parent is the root list
row
int
The row coordinate
The row coordinate
column
int
The column coordinate
The column coordinate