Table of Contents

Class SortDefinition<T>

Namespace
MudBlazor
Assembly
MudBlazor.dll

Represents information about sorting in a MudDataGrid<T>.

public sealed record SortDefinition<T> : IEquatable<SortDefinition<T>>

Type Parameters

T

The type of item being sorted.

Inheritance
SortDefinition<T>
Implements
Inherited Members
Extension Methods

Constructors

SortDefinition(string, bool, int, Func<T, object>, IComparer<object>?)

Represents information about sorting in a MudDataGrid<T>.

public SortDefinition(string SortBy, bool Descending, int Index, Func<T, object> SortFunc, IComparer<object>? Comparer = null)

Parameters

SortBy string

The name of the column to sort by.

Descending bool

When true, sorts in descending order.

Index int

The order of this sort relative to other sort definitions.

SortFunc Func<T, object>

The custom function used to sort values.

Comparer IComparer<object>

The comparer used to compare values.

Properties

Comparer

The comparer used to compare values.

public IComparer<object>? Comparer { get; init; }

Property Value

IComparer<object>

Descending

When true, sorts in descending order.

public bool Descending { get; init; }

Property Value

bool

Index

The order of this sort relative to other sort definitions.

public int Index { get; init; }

Property Value

int

SortBy

The name of the column to sort by.

public string SortBy { get; init; }

Property Value

string

SortFunc

The custom function used to sort values.

public Func<T, object> SortFunc { get; init; }

Property Value

Func<T, object>

Methods

Deconstruct(out string, out bool, out int, out Func<T, object>, out IComparer<object>?)

public void Deconstruct(out string SortBy, out bool Descending, out int Index, out Func<T, object> SortFunc, out IComparer<object>? Comparer)

Parameters

SortBy string
Descending bool
Index int
SortFunc Func<T, object>
Comparer IComparer<object>

Equals(SortDefinition<T>?)

public bool Equals(SortDefinition<T>? other)

Parameters

other SortDefinition<T>

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(SortDefinition<T>?, SortDefinition<T>?)

public static bool operator ==(SortDefinition<T>? left, SortDefinition<T>? right)

Parameters

left SortDefinition<T>
right SortDefinition<T>

Returns

bool

operator !=(SortDefinition<T>?, SortDefinition<T>?)

public static bool operator !=(SortDefinition<T>? left, SortDefinition<T>? right)

Parameters

left SortDefinition<T>
right SortDefinition<T>

Returns

bool