Adds a user-defined data object on the top hierarchical level of the Grid. The data object will be automatically associated with the DataObjectAccessor

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


public Row Add(
	Object dataObject
Visual Basic
Public Function Add ( 
	dataObject As Object
) As Row
Visual C++
Row^ Add(
	Object^ dataObject
member Add : 
        dataObject : Object -> Row 


Type: System..::..Object
The user-defined object. If this object implements INotifyPropertyChanged interface, then the Row will subscribe for the notifications. When a notification is received, the Row will synchronize the calling thread with the GUI thread and will forward the notification to the Grid in the asynchronous way without blocking the calling thread.

Return Value

Type: Row
A new Row, having the data object if success; Otherwise null. The returned Row may be used to build any hierarchy in the Grid.


The function creates a new Row which wrappes the user-defined data object. The Row specifies the position in Rows, Nodes, Children and VisibleChildren collections, handles the visibility, and appearance of the data.


Demonstrates how to add user-defined objects to the Grid
 Copy imageCopy
void PopulateGrid(Grid grid)
    //Add a new object to the scrollable rows on the top hierarchical level
    Row row = grid.Rows.Add(new SomeObject());
    //Add some children to the already inserted row
    row.Add(new SomeChild());
    row.Add(new SomeChild());

Thread Safety

The function is thread safe. The Row is added in the synchronous way with blocking the calling thread.

See Also