ComponentOne DataObjects for .NET
FetchIndex Property (C1DataTable)

C1.Data.2 Assembly > C1.Data Namespace > C1DataTable Class : FetchIndex Property
Gets or sets fetch order of the data table representing a table view rowset.
Syntax
'Declaration
 
Public Property FetchIndex As System.Integer
public System.int FetchIndex {get; set;}
Remarks
This property is used to modify fetch order dynamically in the C1DataSetLogic.BeforeFetch event when this event is fired with empty an TableView argument before fetching any table views. For example:

Visual Basic: Private Sub DataSet_BeforeFetch(ByVal sender As Object, ByVal e As C1.Data.FetchEventArgs) Handles DataSet.BeforeFetch If e.TableView Is Nothing Then e.TableViews("maindata").FetchIndex = 0 End If End Sub

C#: private void dataset_DataSet_BeforeFetch(object sender, C1.Data.FetchEventArgs e) { if (e.TableView == null) e.TableViews["maindata"].FetchIndex = 0; }

Delphi: procedure TForm.dataset_BeforeFetch(sender: System.Object; e: C1.Data.FetchEventArgs); begin if e.TableView = nil then e.TableViews['maindata'].FetchIndex := 0; end;

If you only need to modify fetch order statically, it is easier to do it setting the C1.Data.SchemaObjects.TableView.FetchIndex property in Schema Designer.

Possible values: from 0 up to the number of table views in the dataset.

See Also

Reference

C1DataTable Class
C1DataTable Members
FetchIndex Property