combit List & Label 24 - .NET Online Web Help
SortDescriptions Property
Example 


combit.ListLabel24.DataProviders Namespace > ITable Interface : SortDescriptions Property
This property is queried to receive the available sort orders for your table. It will only be called if the SupportsSorting Property returns true. If your data provider doesn't support sorting, you don't need to implement this property and may safely throw a NotImplementedException.
Syntax
'Declaration
 
ReadOnly Property SortDescriptions As ReadOnlyCollection(Of String)
ReadOnlyCollection<string> SortDescriptions {get;}
property ReadOnlyCollection<String^>^ SortDescriptions {
   ReadOnlyCollection<String^>^ get();
}
Example
private List<string> _sortOrders;
public ReadOnlyCollection<string> SortOrders
{
    get
    {
        if (_sortOrders == null)
        {
            _sortOrders = new List<string>();
            foreach (DataColumn dataColumn in _dataView.Table.Columns)
            {
                _sortOrders.Add(dataColumn.ColumnName + " ASC");
                _sortOrders.Add(dataColumn.ColumnName + " DESC");
            }
        }
        return _sortOrders.AsReadOnly();
    }
}
Private _sortOrders As List(Of String)
Public Readonly Property SortOrders() As ReadOnlyCollection(Of String)
    Get
        If _sortOrders = Nothing Then
            _sortOrders = New List(Of String)()
            For Each dataColumn As DataColumn In _dataView.Table.Columns
                _sortOrders.Add(dataColumn.ColumnName + " ASC")
                _sortOrders.Add(dataColumn.ColumnName + " DESC")
            Next
        End If
        Return _sortOrders.AsReadOnly()
    End Get
End Property
Requirements

Platforms: Windows Vista - Windows 10 Version 1809, Windows Server 2008 - 2016

See Also

Reference

ITable Interface
ITable Members