ComponentOne DataObjects for .NET
SetTableViewRows Method

C1.Data.2 Assembly > C1.Data Namespace > C1DataSet Class : SetTableViewRows Method
The name of the table view to fill with rows.
The list of pointers to table rows.
Optional sort to apply to the table view row collection.
Fills a table view with rows pointing to table rows.
Syntax
'Declaration
 
Public Sub SetTableViewRows( _
   ByVal tableViewName As System.String, _
   ByVal tableRows As System.Collections.ICollection, _
   ByVal fillSort As System.String _
) 
public void SetTableViewRows( 
   System.string tableViewName,
   System.Collections.ICollection tableRows,
   System.string fillSort
)

Parameters

tableViewName
The name of the table view to fill with rows.
tableRows
The list of pointers to table rows.
fillSort
Optional sort to apply to the table view row collection.
Remarks
This method fills a table view with rows. It can be used only on the second stage of ADO.NET data set modification/synchronization process, see Working with ADO.NET Dataset.

The rows are passed in as the tableRows collection. Elements of this collection are pointers to table rows:

For a table view based on a simple table: C1DataRow objects, rows of the corresponding table.

For a table view based on a composite table: arrays of type C1DataRow[], with length equal to the number of "main" simple tables in the composite table ("main" means connected to its parent with a 1-M relation, not with an M-1 one). That is, every element of the list is an array of table rows, one for each "main" constituent table. A composite table can also contain "linked" constituent tables (connected to their parents with M-1 relations). Since "linked" rows can be uniquely located given the values in "main" rows, they are not used here.

The input collection of rows can be obtained by one of the two methods.

After table view rows are created, they are sorted according to the fillSort argument. The sort syntax is the same as in the C1.Data.SchemaObjects.TableView.C1.Data.SchemaObjects.TableView.FillSort property, for example, "CustomerID, OrderDate DESC" (DESC means descending order). If fillSort is empty, the value of C1.Data.SchemaObjects.TableView.C1.Data.SchemaObjects.TableView.FillSort property is used for sorting. If that is empty, the rows are sorted by primary key.

See Also

Reference

C1DataSet Class
C1DataSet Members