Class TableExtensions
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
Provides extension methods for sorting and for MudTable<T>.
public static class TableExtensions
- Inheritance
-
TableExtensions
- Inherited Members
Methods
EditButtonDisabled<T>(TableContext?, T)
public static bool EditButtonDisabled<T>(this TableContext? context, T item)
Parameters
context
TableContextitem
T
Returns
Type Parameters
T
OrderByDirection<TSource, TKey>(IEnumerable<TSource>, SortDirection, Func<TSource, TKey>)
Sorts the elements of a sequence in ascending or descending order according to a key.
public static IOrderedEnumerable<TSource> OrderByDirection<TSource, TKey>(this IEnumerable<TSource> source, SortDirection direction, Func<TSource, TKey> keySelector)
Parameters
source
IEnumerable<TSource>An IEnumerable<T> to order.
direction
SortDirectionThe direction in which to sort the elements (ascending or descending).
keySelector
Func<TSource, TKey>A function to extract a key from an element.
Returns
- IOrderedEnumerable<TSource>
An IOrderedEnumerable<TSource> whose elements are sorted according to a key.
Type Parameters
TSource
The type of the elements of source.
TKey
The type of the key returned by the function represented by keySelector.
OrderByDirection<TSource, TKey>(IQueryable<TSource>, SortDirection, Expression<Func<TSource, TKey>>)
Sorts the elements of a sequence in ascending or descending order according to a key.
public static IOrderedQueryable<TSource> OrderByDirection<TSource, TKey>(this IQueryable<TSource> source, SortDirection direction, Expression<Func<TSource, TKey>> keySelector)
Parameters
source
IQueryable<TSource>An IQueryable<T> to order.
direction
SortDirectionThe direction in which to sort the elements (ascending or descending).
keySelector
Expression<Func<TSource, TKey>>An expression to extract a key from an element.
Returns
- IOrderedQueryable<TSource>
An IOrderedQueryable<TSource> whose elements are sorted according to a key.
Type Parameters
TSource
The type of the elements of source.
TKey
The type of the key returned by the function represented by keySelector.