src/Misc/EFTools/DesignXmlCore/VirtualTreeGrid/Provider/VirtualTree.cs
/// <summary>
///     Find the first non-blank column for the given row.
/// </summary>
/// <param name="row">The row to test</param>
/// <returns>A valid column number</returns>
Find the first non-blank column for the given row.
Find the first non - blank column for the given row .
internal int FindFirstNonBlankColumn(int row)
        {
            var pos = myRootNode.TrackRow(row);
            var offset = pos.SubItemOffset;
            if (offset > 0)
            {
                var tn = pos.ParentNode.GetChildNode(pos.Index);
                var sn = tn.FirstSubItem;
                int maxOffset;
                while (sn != null)
                {
                    maxOffset = sn.RootNode.TotalCount;
                    if (sn.RootNode.ComplexSubItem)
                    {
                        --maxOffset;
                    }
                    if (offset <= maxOffset)
                    {
                        return sn.Column;
                    }
                    sn = sn.NextSibling;
                }
            }
            return 0;
        }
internal int FindFirstNonBlankColumn ( int row ) { var pos = myRootNode . TrackRow ( row ) ; var offset = pos . SubItemOffset ; if ( offset > 0 ) { var tn = pos . ParentNode . GetChildNode ( pos . Index ) ; var sn = tn . FirstSubItem ; int maxOffset ; while ( sn != null ) { maxOffset = sn . RootNode . TotalCount ; if ( sn . RootNode . ComplexSubItem ) { -- maxOffset ; } if ( offset <= maxOffset ) { return sn . Column ; } sn = sn . NextSibling ; } } return 0 ; }
Find the first non-blank column for the given row.
Find the first non - blank column for the given row .
// We're looking at a blank item. Walk the subitems // until we a find a column with a size sufficient // for this offset. // UNDONE_MC: This won't work with nested multicolumn // branches. Move the bulk of this code into TREENODE and // let it recurse to handle this case cleanly.
A valid column number
A valid column number
row
int
The row to test
The row to test