New to Telerik UI for WinFormsStart a free 30-day trial

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.GridView.dll

Syntax:

C#
public class GridSortField : SortDescriptor, INotifyPropertyChanged, INotifyPropertyChangingEx, ICloneable

Inheritance: objectSortDescriptorGridSortField

Implements: ICloneableINotifyPropertyChangedINotifyPropertyChangingEx

Inherited Members SortDescriptor.OnPropertyChanged(string)SortDescriptor.OnPropertyChanging(string, object, object)SortDescriptor.OnPropertyChanging(PropertyChangingEventArgsEx)SortDescriptor.PropertyNameSortDescriptor.DirectionSortDescriptor.OwnerSortDescriptor.PropertyIndexSortDescriptor.PropertyChangedSortDescriptor.PropertyChanging...

Constructors

Initializes a new instance of the GridSortField class.

C#
public GridSortField()

Initializes a new instance of the GridSortField class with field name, sort order and the default data type of string.

C#
public GridSortField(string fieldName, RadSortOrder sortOrder)
Parameters:fieldNamestring

The field name of the new GridSortField object.

sortOrderRadSortOrder

The sort order of the new GridSortField object

Initializes a new instance of the GridSortField class with field name.

C#
public GridSortField(string fieldName)
Parameters:fieldNamestring

The field name of the new GridSortField object.

Properties

Gets or sets the name of the field.

C#
public string FieldName { get; set; }
Property Value:

The name of the field.

Gets a value indicating whether this instance is empty.

C#
[Browsable(false)]
public bool IsEmpty { get; }
Property Value:

true if this instance is empty; otherwise, false.

Gets or sets the sort order.

C#
public RadSortOrder SortOrder { get; set; }
Property Value:

The sort order.

Methods

Clones this instance.

C#
public GridSortField Clone()
Returns:

GridSortField

Determines whether the specified object is equal to this instance.

C#
public override bool Equals(object obj)
Parameters:objobject

The object to compare with this instance.

Returns:

bool

true if the specified object is equal to this instance; otherwise, false.

Exceptions:

NullReferenceException

The obj parameter is null.

Overrides: object.Equals(object)

Returns a hash code for this instance.

C#
public override int GetHashCode()
Returns:

int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

Overrides: object.GetHashCode()

Raises the PropertyChanged event

C#
protected override void OnPropertyChanged(PropertyChangedEventArgs e)
Parameters:ePropertyChangedEventArgs

A PropertyChangedEventArgs instance containing event data.

Overrides: SortDescriptor.OnPropertyChanged(PropertyChangedEventArgs)

Sorts the order as string.

C#
public string SortOrderAsString()
Returns:

string

Sorts the order as string.

C#
public static string SortOrderAsString(RadSortOrder sortOrder)
Parameters:sortOrderRadSortOrder

The sort order.

Returns:

string

Sorts the order from string.

C#
public static RadSortOrder SortOrderFromString(string sortOrder)
Parameters:sortOrderstring

The sort order.

Returns:

RadSortOrder

Returns a string that represents this instance.

C#
public override string ToString()
Returns:

string

A string that represents this instance.

Overrides: object.ToString()