WebGrid WebGrid WebGrid Class

Definition

Displays data on a web page using an HTML table element.

public class WebGrid
type WebGrid = class
Public Class WebGrid
Inheritance
WebGridWebGridWebGrid

Constructors

WebGrid(IEnumerable<Object>, IEnumerable<String>, String, Int32, Boolean, Boolean, String, String, String, String, String, String, String) WebGrid(IEnumerable<Object>, IEnumerable<String>, String, Int32, Boolean, Boolean, String, String, String, String, String, String, String) WebGrid(IEnumerable<Object>, IEnumerable<String>, String, Int32, Boolean, Boolean, String, String, String, String, String, String, String)

Initializes a new instance of the WebGrid class.

Properties

AjaxUpdateCallback AjaxUpdateCallback AjaxUpdateCallback

Gets the name of the JavaScript function to call after the HTML element that is associated with the WebGrid instance has been updated in response to an Ajax update request.

AjaxUpdateContainerId AjaxUpdateContainerId AjaxUpdateContainerId

Gets the value of the HTML id attribute that marks an HTML element on the web page that gets dynamic Ajax updates that are associated with the WebGrid instance.

CanSort CanSort CanSort

Gets a value that indicates whether the WebGrid instance supports sorting.

ColumnNames ColumnNames ColumnNames

Gets a collection that contains the name of each data column that is bound to the WebGrid instance.

FieldNamePrefix FieldNamePrefix FieldNamePrefix

Gets the prefix that is applied to all query-string fields that are associated with the WebGrid instance.

HasSelection HasSelection HasSelection

Gets a value that indicates whether a row in the WebGrid instance is selected.

IsAjaxEnabled IsAjaxEnabled IsAjaxEnabled

Returns a value that indicates whether the WebGrid instance can use Ajax calls to refresh the display.

PageCount PageCount PageCount

Gets the number of pages that the WebGrid instance contains.

PageFieldName PageFieldName PageFieldName

Gets the full name of the query-string field that is used to specify the current page of the WebGrid instance.

PageIndex PageIndex PageIndex

Gets or sets the index of the current page of the WebGrid instance.

Rows Rows Rows

Gets a list that contains the rows that are on the current page of the WebGrid instance after the grid has been sorted.

RowsPerPage RowsPerPage RowsPerPage

Gets the number of rows that are displayed on each page of the WebGrid instance.

SelectedIndex SelectedIndex SelectedIndex

Gets or sets the index of the selected row relative to the current page of the WebGrid instance.

SelectedRow SelectedRow SelectedRow

Gets the currently selected row of the WebGrid instance.

SelectionFieldName SelectionFieldName SelectionFieldName

Gets the full name of the query-string field that is used to specify the selected row of the WebGrid instance.

SortColumn SortColumn SortColumn

Gets or sets the name of the data column that the WebGrid instance is sorted by.

SortDirection SortDirection SortDirection

Gets or sets the direction in which the WebGrid instance is sorted.

SortDirectionFieldName SortDirectionFieldName SortDirectionFieldName

Gets the full name of the query-string field that is used to specify the sort direction of the WebGrid instance.

SortFieldName SortFieldName SortFieldName

Gets the full name of the query-string field that is used to specify the name of the data column that the WebGrid instance is sorted by.

TotalRowCount TotalRowCount TotalRowCount

Gets the total number of rows that the WebGrid instance contains.

Methods

AddSorter<TElement,TProperty>(String, Expression<Func<TElement,TProperty>>) AddSorter<TElement,TProperty>(String, Expression<Func<TElement,TProperty>>) AddSorter<TElement,TProperty>(String, Expression<Func<TElement,TProperty>>)

Adds a specific sort function for a given column.

Bind(IEnumerable<Object>, IEnumerable<String>, Boolean, Int32) Bind(IEnumerable<Object>, IEnumerable<String>, Boolean, Int32) Bind(IEnumerable<Object>, IEnumerable<String>, Boolean, Int32)

Binds the specified data to the WebGrid instance.

Column(String, String, Func<Object,Object>, String, Boolean) Column(String, String, Func<Object,Object>, String, Boolean) Column(String, String, Func<Object,Object>, String, Boolean)

Creates a new WebGridColumn instance.

Columns(WebGridColumn[]) Columns(WebGridColumn[]) Columns(WebGridColumn[])

Returns an array that contains the specified WebGridColumn instances.

GetContainerUpdateScript(String) GetContainerUpdateScript(String) GetContainerUpdateScript(String)

Returns a JavaScript statement that can be used to update the HTML element that is associated with the WebGrid instance on the specified web page.

GetHtml(String, String, String, String, String, String, String, Boolean, Boolean, String, IEnumerable<WebGridColumn>, IEnumerable<String>, WebGridPagerModes, String, String, String, String, Int32, Object) GetHtml(String, String, String, String, String, String, String, Boolean, Boolean, String, IEnumerable<WebGridColumn>, IEnumerable<String>, WebGridPagerModes, String, String, String, String, Int32, Object) GetHtml(String, String, String, String, String, String, String, Boolean, Boolean, String, IEnumerable<WebGridColumn>, IEnumerable<String>, WebGridPagerModes, String, String, String, String, Int32, Object)

Returns the HTML markup that is used to render the WebGrid instance and using the specified paging options.

GetPageUrl(Int32) GetPageUrl(Int32) GetPageUrl(Int32)

Returns a URL that can be used to display the specified data page of the WebGrid instance.

GetSortUrl(String) GetSortUrl(String) GetSortUrl(String)

Returns a URL that can be used to sort the WebGrid instance by the specified column.

Pager(WebGridPagerModes, String, String, String, String, Int32) Pager(WebGridPagerModes, String, String, String, String, Int32) Pager(WebGridPagerModes, String, String, String, String, Int32)

Returns the HTML markup that is used to provide the specified paging support for the WebGrid instance.

Table(String, String, String, String, String, String, String, Boolean, Boolean, String, IEnumerable<WebGridColumn>, IEnumerable<String>, Func<Object,Object>, Object) Table(String, String, String, String, String, String, String, Boolean, Boolean, String, IEnumerable<WebGridColumn>, IEnumerable<String>, Func<Object,Object>, Object) Table(String, String, String, String, String, String, String, Boolean, Boolean, String, IEnumerable<WebGridColumn>, IEnumerable<String>, Func<Object,Object>, Object)

Returns the HTML markup that is used to render the WebGrid instance.

Applies to