A collection of visible child Rows.

Namespace: Dapfor.Net.Ui
Assembly: Dapfor.Net (in Dapfor.Net.dll) Version: 2.10.3.24917 (2.10.3.24917)

Syntax

C#
public sealed class VisibleRowCollection : IEnumerable<Row>, 
	IEnumerable
Visual Basic
Public NotInheritable Class VisibleRowCollection
	Implements IEnumerable(Of Row), IEnumerable
Visual C++
public ref class VisibleRowCollection sealed : IEnumerable<Row^>, 
	IEnumerable
F#
[<SealedAttribute>]
type VisibleRowCollection =  
    class
        interface IEnumerable<Row>
        interface IEnumerable
    end

Remarks

The first visible child index in this collection always equals to 0 and may diff to VisibleIndex.

Examples

 Copy imageCopy
public void PopulateGrid(Grid grid)
{
    //Configure the headers
    grid.Headers.Add(new Header());
    grid.Headers[0].Add(new Column("Name"));

    grid.Headers.Add(new Header());
    grid.Headers[1].Add(new Column("Song"));

    Row rowPlaylist = grid.Rows.Add(new Playlist("Queen"));

    rowPlaylist.Add(new Song("Keep Yourself Alive"));
    rowPlaylist.Add(new Song("Great King Rat"));
    rowPlaylist.Add(new Song("White Queen"));

    grid.Rows.ExpandAll();

    Console.WriteLine("{0} Rows at the top hierarchical level", grid.Nodes.Count);
    //Iterate all playlists (top-level items)
    foreach (Row playlist in grid.Nodes)
    {
        Console.WriteLine("Playlist '{0}':", playlist["Name"].Text);

        //Iterate all songs
        foreach (Row song in playlist.VisibleChildren)
        {
            Console.WriteLine("Song '{0}'", song["Song"].Text);
        }
    }

    //Collapse the rowPlaylist - All children become invisible
    rowPlaylist.Expanded = false;

    Console.WriteLine("Count of Songs '{0}'", rowPlaylist.Children.Count);
    Console.WriteLine("Count of visible Songs '{0}'", rowPlaylist.VisibleChildren.Count);
}

// Console output:
1 Rows at the top hierarchical level
Playlist 'Queen':
Song 'Keep Yourself Alive'
Song 'Great King Rat'
Song 'White Queen'
Count of Songs '3'
Count of visible Songs '0'

Inheritance Hierarchy

System..::..Object
  Dapfor.Net.Ui..::..Row..::..VisibleRowCollection

See Also