Ensures this cell visible.

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

Syntax

C#
public void EnsureVisible()
Visual Basic
Public Sub EnsureVisible
Visual C++
public:
void EnsureVisible()
F#
member EnsureVisible : unit -> unit 

Remarks

The grid provides a simple ability to place rows or cells in visible area of the grid with Row.EnsureVisible() and Cell.UnsureVisible(). If necessary, the grid scrolls rows and columns.
 Copy imageCopy
public void EnsureVisibleExample(Grid grid)
{
    grid.Headers.Add(new Header());
    grid.Headers[0].Add(new Column("Price"));
    grid.Headers[0].Add(new Column("Quantity"));
    //Add more columns...

    grid.Rows.Add(new Product());
    Row row = grid.Rows[0];
    //Add more rows...

    //Ensure the row visible
    row.EnsureVisible();

    //Ensure the column visible
    grid.Headers[0]["Price"].EnsureVisible();


    //Ensure the cell visible
    row["Price"].EnsureVisible();
}

Thread Safety

The method is not thread safe.

See Also