WebGrid.Bind Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Binds the specified data to the WebGrid instance.
C#
public System.Web.Helpers.WebGrid Bind (System.Collections.Generic.IEnumerable<dynamic> source, System.Collections.Generic.IEnumerable<string> columnNames = default, bool autoSortAndPage = true, int rowCount = -1);
member this.Bind : seq<obj> * seq<string> * bool * int -> System.Web.Helpers.WebGrid
Public Function Bind (source As IEnumerable(Of Object), Optional columnNames As IEnumerable(Of String) = null, Optional autoSortAndPage As Boolean = true, Optional rowCount As Integer = -1) As WebGrid
- source
- IEnumerable<Object>
The data to display.
- columnNames
- IEnumerable<String>
A collection that contains the names of the data columns to bind.
- autoSortAndPage
- Boolean
true to enable sorting and paging of the WebGrid instance; otherwise, false.
- rowCount
- Int32
The number of rows to display on each page of the grid.
The bound and populated WebGrid instance.
Product | Versions |
---|---|
ASP.NET Web Pages | 3.2 |