NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

TableSetting.Sort

Gets or sets the sort column or columns, and sort order for the table.

[Visual Basic]
Public Property Sort As String
[C#]
public string Sort {get; set;}
[C++]
public: __property String* get_Sort();
public: __property void set_Sort(String*);
[JScript]
public function get Sort() : String;
public function set Sort(String);

Property Value

A string containing the column name followed by "ASC" (ascending) or "DESC" (descening). Columns are sorted asending by default. Multiple columns can be separated by commas.

Remarks

See the Expression property of DataColumn for more details on forming a Sort expression.

Example [Visual Basic]

The following example prints the Sort property of a given TableSetting object.

[Visual Basic]

Private Sub GetTableSetting(dsv As DataSetView)
   Dim t As DataTable
   t = DataSet1.Tables("Customers")
   ' Get the TableSetting from a given DataSetView
   Dim ts As TableSetting
   ts = dsv.TableSettings(t)
   Debug.Print ts.Sort
End Sub

See Also

TableSetting Class | TableSetting Members | System.Data Namespace | RowFilter