DataGrid<Model>
Display a typed .NET Collection
Assembly: ServiceStack.Blazor.dll
View Source
Declaration
public class DataGrid<Model> : UiComponentBase
Properties
LocalStorage
View Source
Declaration
public LocalStorage LocalStorage { get; set; }
Id
View Source
Declaration
public string Id { get; set; }
Columns
View Source
Declaration
public RenderFragment<Column<Model>> Columns { get; set; }
FilterDefinitions
View Source
Declaration
public List<AutoQueryConvention> FilterDefinitions { get; set; }
Items
View Source
Declaration
public ICollection<Model> Items { get; set; }
ChildContent
View Source
Declaration
public RenderFragment ChildContent { get; set; }
RowClass
View Source
Declaration
public Func<Model, int, string> RowClass { get; set; }
AllowSelection
View Source
Declaration
public bool AllowSelection { get; set; }
AllowFiltering
View Source
Declaration
public bool AllowFiltering { get; set; }
HeaderSelected
View Source
Declaration
public EventCallback<Column<Model>> HeaderSelected { get; set; }
RowSelected
View Source
Declaration
public EventCallback<Model> RowSelected { get; set; }
TableStyle
View Source
Declaration
public TableStyle TableStyle { get; set; }
GridClass
View Source
Declaration
public string GridClass { get; set; }
Grid2Class
View Source
Declaration
public string Grid2Class { get; set; }
Grid3Class
View Source
Declaration
public string Grid3Class { get; set; }
Grid4Class
View Source
Declaration
public string Grid4Class { get; set; }
TableClass
View Source
Declaration
public string TableClass { get; set; }
TableHeadClass
View Source
Declaration
public string TableHeadClass { get; set; }
TableHeaderRowClass
View Source
Declaration
public string TableHeaderRowClass { get; set; }
TableHeaderCellClass
View Source
Declaration
public string TableHeaderCellClass { get; set; }
TableBodyClass
View Source
Declaration
public string TableBodyClass { get; set; }
SelectedColumns
View Source
Declaration
public List<string>? SelectedColumns { get; set; }
FiltersTopLeftResolver
View Source
Declaration
public Func<MouseEventArgs, DOMRect>? FiltersTopLeftResolver { get; set; }
MaxFieldLength
View Source
Declaration
public int MaxFieldLength { get; set; }
JS
View Source
Declaration
public IJSRuntime JS { get; set; }
StateChangedHandlers
View Source
Declaration
public List<Action> StateChangedHandlers { get; set; }
StateChanged
View Source
Declaration
public EventCallback StateChanged { get; set; }
ShowFiltersTopLeft
View Source
Declaration
public DOMRect? ShowFiltersTopLeft { get; set; }
PropertyChanged
View Source
Declaration
public EventCallback<string> PropertyChanged { get; set; }
FiltersChanged
View Source
Declaration
public EventCallback<List<Filter>> FiltersChanged { get; set; }
AppMetadata
View Source
Declaration
public AppMetadata AppMetadata { get; set; }
MetadataType
View Source
Declaration
public MetadataType MetadataType { get; }
SelectedItem
View Source
Declaration
public Model SelectedItem { get; }
VisibleColumns
View Source
Declaration
public IEnumerable<Column<Model>> VisibleColumns { get; }
ColumnsMap
View Source
Declaration
public Dictionary<string, Column<Model>> ColumnsMap { get; }
Inherited Properties
class
Optional user defined classes for this component
View Source
Declaration
public string class { get; set; }
Class
View Source
Declaration
public string Class { get; }
JS
View Source
Declaration
public IJSRuntime JS { get; set; }
Methods
SetSelectedItem(Model)
View Source
Declaration
public async Task SetSelectedItem(Model model)
Returns
Task
Parameters
Type | Name |
---|---|
<Model> | model |
GetColumns()
View Source
Declaration
public List<Column<Model>> GetColumns()
Returns
List<ServiceStack.Blazor.Components.Column<<Model>>>
OnAfterRender(Boolean)
View Source
Declaration
protected override void OnAfterRender(bool firstRender)
Parameters
Type | Name |
---|---|
System.Boolean | firstRender |
Inherited Methods
ClassNames(String[])
Helper to combine multiple css classes. Strings can contain multiple classes, empty strings are ignored.
View Source
Declaration
protected virtual string ClassNames(params string[] classes)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String[] | classes |
CssClass(String, String)
Return any user-defined classes along with optional classes for when component is in a valid
or invalid
state
View Source
Declaration
protected virtual string CssClass(string valid = null, string invalid = null)
Returns
System.String
Parameters
Type | Name | Description |
---|---|---|
System.String | valid | css classes to include when valid |
|
| System.String
| invalid | css classes to include when invalid
|
OnAfterRenderAsync(Boolean)
View Source
Declaration
protected override async Task OnAfterRenderAsync(bool firstRender)
Returns
Task
Parameters
Type | Name |
---|---|
System.Boolean | firstRender |
QueueRenderAction(Func<IJSRuntime, Task>)
View Source
Declaration
protected virtual void QueueRenderAction(Func<IJSRuntime, Task> action)
Parameters
Type | Name |
---|---|
Func<IJSRuntime,Task> | action |
SanitizeAttribute(String)
View Source
Declaration
public static bool SanitizeAttribute(string name)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | name |
SanitizeAttributes(Nullable<IReadOnlyDictionary<String, Object>>)
View Source
Declaration
public static IReadOnlyDictionary<string, object>? SanitizeAttributes(IReadOnlyDictionary<string, object>? attrs)
Returns
System.Nullable<IReadOnlyDictionary<System.String,System.Object>>
Parameters
Type | Name |
---|---|
System.Nullable<IReadOnlyDictionary<System.String,System.Object>> | attrs |
SetTitle(String)
Set the document.title
View Source
Declaration
protected virtual void SetTitle(string title)
Parameters
Type | Name |
---|---|
System.String | title |