Ensures the Row visible.

Namespace: Dapfor.Wpf.Controls
Assembly: Dapfor.Wpf (in Dapfor.Wpf.dll) Version: 4.1.0.26317 (4.1.0.26317)

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.EnsureVisible(). If necessary, the grid scrolls rows and columns.
 Copy imageCopy
public void EnsureVisibleExample(GridControl 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();
}

See Also