wv-grid
Purpose
<wv-grid/>
. Generates a table / grid with integrated paging, sorting and more. The primary tool for presenting list of entity records. This tag helper is used in conjunction with <wv-grid-row/>
and <wv-grid-column/>
Properties
name | description |
---|---|
bordered |
object type: default value: is required: Draws table borders, by applying Bootstrap styling |
borderless |
object type: default value: is required: Draws borderless table, by applying Bootstrap styling |
class |
object type: default value: is required: Added to the grid generated classes |
columns |
object type: default value: is required: Describes the columns of the grid. |
culture |
object type: default value: is required: Used in data presentation. Could be inherited by other helpers wrapped in a |
has-tfoot |
object type: default value: is required: If FALSE, it will head the grid's tfoot element |
has-thead |
object type: default value: is required: If FALSE, it will head the grid's thead element |
hover |
object type: default value: is required: Changes the background of the hovered table row, by applying Bootstrap styling |
id |
object type: default value: is required: Html ID you may need to set to the rendered element |
name |
object type: default value: is required: Used in grid's CSS class generation |
page |
object type: default value: is required: Sets the current page value |
page-size |
object type: default value: is required: Sets the expected page size |
prefix |
object type: default value: is required: If you have two or more grids on a single page, each grid could apply a prefix to it query parameters it applies. |
query-string-page |
object type: default value: is required: This will override the default query string name for pagination. Used only in grid links generation |
query-string-sortby |
object type: default value: is required: This will override the default query string name for sorting. Used only in grid links generation |
query-string-sort-order |
object type: default value: is required: This will override the default query string name for sorting order. Used only in grid links generation |
responsive-breakpoint |
object type: default value: is required: Across every breakpoint for horizontally scrolling tables. |
small |
object type: default value: is required: less padding of the table cells, by applying Bootstrap styling |
striped |
object type: default value: is required: Alternates the background of each row of the table, by applying Bootstrap styling |
total-count |
object type: default value: is required: Sets the total count of the records |
vertical-align |
object type: default value: is required: vertical alignment with the table. Options are: None, Top, Middle, Bottom |
Example
<wv-grid page="@pager" total-count="@totalCount" columns="@columns">
@foreach(var record in records)
{
<wv-grid-row>
<wv-grid-column>...</wv-grid-column>
<wv-grid-column>...</wv-grid-column>
</wv-grid-row>
}
</wv-form>