Collection of data objects that enables searching rows by a data object.

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

Syntax

C#
public sealed class GridDataObjects
Visual Basic
Public NotInheritable Class GridDataObjects
Visual C++
public ref class GridDataObjects sealed
F#
[<SealedAttribute>]
type GridDataObjects =  class end

Remarks

If you work with reference-type data objects, you can use convenient grid features to search row or rows that contain the required data object.

You can get a data object that is associated with a row by calling Row.DataObject property. The same data object may be contained in multiple grid rows. You can get them using GridControl.DataObjects.Find(object) method. If you need only the first row, you can use GridControl.DataObjects.FindFirstRow(object) method.

 Copy imageCopy
public void ReverseSearchExample(GridControl grid)
{
    //Add some products...
    Product product1 = new Product();
    Product product2 = new Product();
    grid.Rows.Add(product1);
    grid.Rows.Add(product2);

    //The first found row (not the first visible - just the first found!)
    Row row1 = grid.DataObjects.FindFirstRow(product1);
    //Enumerate all rows, related to the data object
    foreach (Row row in grid.DataObjects.Find(product1))
    {
        //Do something here
    }
}

Inheritance Hierarchy

System..::..Object
  Dapfor.Wpf.Controls..::..GridControl..::..GridDataObjects

See Also