WebGrid.Bind Method
Binds the specified data to the WebGrid instance.
Namespace: System.Web.Helpers
Assembly: System.Web.Helpers (in System.Web.Helpers.dll)
Syntax
'Declaration
Public Function Bind ( _
source As IEnumerable(Of Object), _
columnNames As IEnumerable(Of String), _
autoSortAndPage As Boolean, _
rowCount As Integer _
) As WebGrid
'Usage
Dim instance As WebGrid
Dim source As IEnumerable(Of Object)
Dim columnNames As IEnumerable(Of String)
Dim autoSortAndPage As Boolean
Dim rowCount As Integer
Dim returnValue As WebGrid
returnValue = instance.Bind(source, columnNames, _
autoSortAndPage, rowCount)
public WebGrid Bind(
IEnumerable<Object> source,
IEnumerable<string> columnNames,
bool autoSortAndPage,
int rowCount
)
public:
WebGrid^ Bind(
IEnumerable<Object^>^ source,
IEnumerable<String^>^ columnNames,
bool autoSortAndPage,
int rowCount
)
member Bind :
source:IEnumerable<Object> *
columnNames:IEnumerable<string> *
autoSortAndPage:bool *
rowCount:int -> WebGrid
public function Bind(
source : IEnumerable<Object>,
columnNames : IEnumerable<String>,
autoSortAndPage : boolean,
rowCount : int
) : WebGrid
Parameters
- source
Type: System.Collections.Generic.IEnumerable<Object>
The data to display.
- columnNames
Type: System.Collections.Generic.IEnumerable<String>
A collection that contains the names of the data columns to bind.
- autoSortAndPage
Type: System.Boolean
true to enable sorting and paging of the WebGrid instance; otherwise, false.
- rowCount
Type: System.Int32
The number of rows to display on each page of the grid.
Return Value
Type: System.Web.Helpers.WebGrid
The bound and populated WebGrid instance.