次の方法で共有


WebGrid コンストラクター

定義

WebGrid クラスの新しいインスタンスを初期化します。

public WebGrid (System.Collections.Generic.IEnumerable<dynamic> source = default, System.Collections.Generic.IEnumerable<string> columnNames = default, string defaultSort = default, int rowsPerPage = 10, bool canPage = true, bool canSort = true, string ajaxUpdateContainerId = default, string ajaxUpdateCallback = default, string fieldNamePrefix = default, string pageFieldName = default, string selectionFieldName = default, string sortFieldName = default, string sortDirectionFieldName = default);
new System.Web.Helpers.WebGrid : seq<obj> * seq<string> * string * int * bool * bool * string * string * string * string * string * string * string -> System.Web.Helpers.WebGrid
Public Sub New (Optional source As IEnumerable(Of Object) = null, Optional columnNames As IEnumerable(Of String) = null, Optional defaultSort As String = null, Optional rowsPerPage As Integer = 10, Optional canPage As Boolean = true, Optional canSort As Boolean = true, Optional ajaxUpdateContainerId As String = null, Optional ajaxUpdateCallback As String = null, Optional fieldNamePrefix As String = null, Optional pageFieldName As String = null, Optional selectionFieldName As String = null, Optional sortFieldName As String = null, Optional sortDirectionFieldName As String = null)

パラメーター

source
IEnumerable<Object>

表示するデータ。

columnNames
IEnumerable<String>

表示するデータ列の名前を含むコレクション。 既定では、この値は パラメーターの値に従って自動的に source 設定されます。

defaultSort
String

既定でグリッドの並べ替えに使用するデータ列の名前。

rowsPerPage
Int32

ページングが有効である場合に、グリッドの各ページに表示される行数。 既定値は 10 です。

canPage
Boolean

インスタンスに対してページングが有効になっていることを指定する WebGrid 場合は true、それ以外の場合は false。 既定値は true です。

canSort
Boolean

インスタンスに対して並べ替えが有効になっていることを指定する WebGrid 場合は true、それ以外の場合は false。 既定値は true です。

ajaxUpdateContainerId
String

インスタンスに関連付けられている動的 Ajax 更新プログラムを取得する HTML 要素をマークするために使用される HTML id 属性の WebGrid 値。

ajaxUpdateCallback
String

プロパティで指定された HTML 要素が更新された後に呼び出される JavaScript 関数の AjaxUpdateContainerId 名前。 関数の名前が指定されていない場合、関数は呼び出されません。 指定された関数が存在しない場合、関数が呼び出されたときに JavaScript エラーが発生します。

fieldNamePrefix
String

インスタンスに関連付けられている WebGrid すべてのクエリ文字列フィールドに適用されるプレフィックス。 この値は、同じ Web ページ上で複数 WebGrid のインスタンスをサポートするために使用されます。

pageFieldName
String

インスタンスの現在のページを指定するために使用されるクエリ文字列フィールドの WebGrid 名前。

selectionFieldName
String

インスタンスの現在選択されている行を指定するために使用されるクエリ文字列フィールドの WebGrid 名前。

sortFieldName
String

インスタンスの並べ替えの基準となるデータ列の名前を指定するために使用されるクエリ文字列フィールドの WebGrid 名前。

sortDirectionFieldName
String

インスタンスの並べ替え方向を指定するために使用されるクエリ文字列フィールドの WebGrid 名前。

適用対象