ComponentOne DataObjects for .NET
FillSort Property (FilterCondition)

C1.Data.2 Assembly > C1.Data Namespace > FilterCondition Class : FillSort Property
Gets or sets the sort field or fields, and sort order for filling a table view with data.
Syntax
'Declaration
 
Public Property FillSort As System.String
public System.string FillSort {get; set;}
Remarks
By default, fetched data is sorted according to the TableView.FillSort property, or by primary key if TableView.FillSort is empty. This default order can be overridden at run time, when calling Fill by specifying the required sort order in one of the filter conditions passed to the Fill method as a parameter. Set this property to the sort field name(s). To specify sort order (ascending/descending), add "ASC" (ascending) or "DESC" (descending) after the field name. If no order is specified, the order is "ASC" (ascending). Multiple field names are separated with commas. Example: "CustomerID DESC, OrderID".

Fill sort can be set for any filter condition filtering the given table view, or a special filter condition can be created for this purpose (if there are no filtering conditions for this table view), with IsCustom = True and empty ConditionText.

Note that in virtual mode (TableView.DataAccessMode property set to a mode other than Static) FillSort, both in filter conditions and in TableView class, must form a unique key. If it does not represent a unique key, a run time exception will occur when two different row with equal key values are fetched in virtual mode. You can always ensure uniqueness of a sort order by adding primary key fields in the end.

See Also

Reference

FilterCondition Class
FilterCondition Members