<script type="text/javascript" src="~/Scripts/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src="~/Scripts/prowler-mvc.js"></script>
<link rel="stylesheet" href="~/Content/prowler-mvc.css"/>
@using Prowler.Mvc.UI
@Html.Prowler().Grid()
| Method name | Description |
|---|---|
| BindTo(IEnumerable |
Sets the data source (Model) for this control |
| UniqueId(string) | Sets the Unique ID of the row the value must unique, used when the column is in edit mode |
| AutoSizeHeaders() | Enable the auto size of headers, work only when a fixed width is set on the grid |
| Name(string) | Sets the name of the component |
| AllowColumnResize() | Enable column resize |
| Pagination(Prowler.Mvc.UI.Pagination) | Enable pagination container |
| Height(int) | Sets the height of the control in pixels |
| Width(int) | Sets the width of the control in pixels |
| HtmlAttributes(string, string) | Sets the HTML attributes, can be used multiple times to add new attributes |
| Columns(Prowler.Mvc.UI.Column) | Sets the columns in the control |
| ErrorFunction(string) | Configures the client-side event on grid error |
| GridEvent(Prowler.Mvc.UI.GridEvents, string) | Configures the client-side events |
| ActionSort(string) | Sets the url of the sorting action |
| IncludeFilterContainer(string) | Sets the filter container id to be included on POST |
| ToolBarTemplate(string) | Value Template to be used to render the ToolBar |
| ToolBarTemplate(MvcHtmlString) | Value Template to be used to render the ToolBar |
| Render() | Render the Grid control |
| Method name | Description |
|---|---|
| BindTo(string) | Sets the property from the data source (Model) for this cell, the value will be displayed on the cell |
| Title(string) | Sets the Title of the column header |
| Width(int) | Sets the width of the column header |
| Sorting(string) | Enables the sorting on the column header and sets the name of parameter to use on POST the value sent can be "asc" or "desc" |
| AsEditable(Prowler.Mvc.UI.GridInputType) | Sets the type of editorial control to render in the cell |
| AsReadOnly(string) | Sets the edit control as read only, boolean property from the data source can be bound to set the control as a read only state based on the property value |
| RowTemplate(string) | Value Template to be used to render the cell value |
| RowTemplate(MvcHtmlString) | Value Template to be used to render the cell value |
| ColumnTemplate(string) | Value Template to be used to render the cell value |
| ColumnTemplate(MvcHtmlString) | Value Template to be used to render the cell value |
| HtmlAttributes(string, string) | Sets the HTML attributes, can be used multiple times to add new attributes |
| HeaderAsCheckBox(string, bool) | Sets an editable check box control on the column header |