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);
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.
See the Expression property of DataColumn for more details on forming a Sort expression.
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
TableSetting Class | TableSetting Members | System.Data Namespace | RowFilter