WebGrid 類別

定義

使用 HTML 資料表元素在網頁上顯示資料。

public class WebGrid
type WebGrid = class
Public Class WebGrid
繼承
WebGrid

建構函式

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

初始化 WebGrid 類別的新執行個體。

屬性

AjaxUpdateCallback

取得 JavaScript 函式的名稱,以在與實例相關聯的 WebGrid HTML 專案更新後呼叫,以回應 Ajax 更新要求。

AjaxUpdateContainerId

取得 HTML id 屬性的值,這個屬性值會標記網頁上的 HTML 專案,以取得與 WebGrid 實例相關聯的動態 Ajax 更新。

CanSort

取得值,這個值表示實例是否 WebGrid 支援排序。

ColumnNames

取得集合,其中包含系結至 WebGrid 實例的每個資料行名稱。

FieldNamePrefix

取得前置詞,此前置詞會套用至與 WebGrid 實例相關聯的所有查詢字串欄位。

HasSelection

取得值,這個值表示是否已選取 實例中的資料 WebGrid 列。

IsAjaxEnabled

傳回值,指出實例是否可以 WebGrid 使用 Ajax 呼叫來重新整理顯示。

PageCount

取得 實例包含的頁面 WebGrid 數目。

PageFieldName

取得用來指定實例目前頁面 WebGrid 之查詢字串欄位的完整名稱。

PageIndex

取得或設定實例目前頁面的 WebGrid 索引。

Rows

取得清單,其中包含排序方格之後實例目前頁面上 WebGrid 的資料列。

RowsPerPage

取得實例每個頁面上 WebGrid 所顯示的資料列數目。

SelectedIndex

取得或設定相對於實例目前頁面之選取資料列的 WebGrid 索引。

SelectedRow

取得實例目前選取的資料 WebGrid 列。

SelectionFieldName

取得查詢字串欄位的完整名稱,這個欄位用來指定實例的 WebGrid 選取資料列。

SortColumn

取得或設定實例排序的資料行 WebGrid 名稱。

SortDirection

取得或設定實例排序的方向 WebGrid

SortDirectionFieldName

取得用來指定實例排序方向 WebGrid 之查詢字串欄位的完整名稱。

SortFieldName

取得查詢字串欄位的完整名稱,這個欄位用來指定實例排序的資料行 WebGrid 名稱。

TotalRowCount

取得實例包含的資料列 WebGrid 總數。

方法

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

為指定的資料行新增特定排序函數。

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

將指定的資料系結至 WebGrid 實例。

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

建立新的 WebGridColumn 執行個體。

Columns(WebGridColumn[])

傳回包含指定 WebGridColumn 實例的陣列。

GetContainerUpdateScript(String)

傳回 JavaScript 語句,可用來更新與指定網頁上實例相關聯的 WebGrid HTML 專案。

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

傳回 HTML 標籤,這個標記是用來轉譯 WebGrid 實例,以及使用指定的分頁選項。

GetPageUrl(Int32)

傳回 URL,可用來顯示實例的 WebGrid 指定資料頁面。

GetSortUrl(String)

傳回 URL,這個 URL 可用來依指定的資料行排序 WebGrid 實例。

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

傳回 HTML 標籤,用來提供實例的 WebGrid 指定分頁支援。

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

傳回用來呈現 實例的 WebGrid HTML 標籤。

適用於