A collection of RadListViewSortExpression objects. Depending on the value of AllowMultiFieldSorting it holds single or multiple sort expressions.
Definition
Namespace:Telerik.Web.UI
Assembly:Telerik.Web.UI.dll
Syntax:
[TypeConverter(typeof(ExpandableObjectConverter))]
public class RadListViewSortExpressionCollection : IList, ICollection, IEnumerable, IStateManager
Inheritance: objectRadListViewSortExpressionCollection
Implements:
Inherited Members
Properties
If false, the collection can contain only one sort expression at a time. Trying to add a new one in this case will delete the existing expression or will change the sort order if its FiledName is the same.
[Browsable(false)]
public bool AllowMultiFieldSorting { get; set; }
Allow the no-sort state when changing sort order.
[Browsable(false)]
public bool AllowNaturalSort { get; set; }
Returns the number of items in the RadListViewSortExpressionCollection.
[Browsable(false)]
public int Count { get; }
Implements:
Gets a value indicating whether access to the RadListViewSortExpressionCollection is synchronized (thread safe).
[Browsable(false)]
public bool IsSynchronized { get; }
Implements:
This is the default indexer of the collection - takes an integer value.
Methods
Adds a RadListViewSortExpression to the collection.
Adds a RadListViewSortExpression to the collection at the specified index.
public void AddAt(int index, RadListViewSortExpression sortExpression)
As a convenience feature, adding at an index greater than zero will set the AllowMultiFieldSorting to true.
If AllowMultiFieldSorting is true adds the sortExpression in the collection. Else any other expression previously stored in the collection wioll be removed
public void AddSortExpression(RadListViewSortExpression sortExpression)
If AllowMultiFieldSorting is true adds the sortExpression in the collection. Else any other expression previously stored in the collection wioll be removed
public void AddSortExpression(string expression)
String containing sort field and optionaly sort order (ASC or DESC)
Adds the sort field (expression parameter) if the collection does not alreqady contain the field. Else the sort order of the field will be inverted. The default change order is Asc -> Desc -> No Sort. The No-Sort state can be controlled using AllowNaturalSort property
Clears the RadListViewSortExpressionCollection of all items.
public void Clear()
Implements:
Returns true or false depending on whether the specified sorting expression exists in the collection. Takes a RadListViewSortExpression parameter.
public bool ContainsSortExpression(RadListViewSortExpression sortExpression)
Returns an enumerator that iterates through the RadListViewSortExpressionCollection.
Find a SortExpression in the collection if it contains any with sort field = expression
public RadListViewSortExpression GetExpression(string expression)
sort field
Returns:Get a comma separated list of sort fields and sort-order, in the same format used by DataView.Sort string expression. Returns null (Nothing) if there are no sort expressions in the collection
public string GetSortString()
Comma separated list of sort fields and optionaly sort-order, null if there are no sort expressions in the collection
Searches for the specified RadListViewSortExpression and returns the zero-based index of the first occurrence within the entire RadListViewSortExpressionCollection.
public int IndexOf(RadListViewSortExpression viewSortExpression)
Removes the specified RadListViewSortExpression from the collection.
public void RemoveSortExpression(RadListViewSortExpression sortExpression)