The Grid widget displays tabular data and offers rich support interacting with data, including paging, sorting, grouping, and selection. Grid is a powerful widget with many configuration options. It can be bound to local JSON data or to remote data using the Kendo DataSource component.
<!-- Define the HTML table, with rows, columns, and data -->
<table id="grid">
<thead>
<tr>
<th data-field="title">Title</th>
<th data-field="year">Year</th>
</tr>
</thead>
<tbody>
<tr>
<td>Star Wars: A New Hope</td>
<td>1977</td>
</tr>
<tr>
<td>Star Wars: The Empire Strikes Back</td>
<td>1980</td>
</tr>
</tbody>
</table>
$(document).ready(function(){
$("#grid").kendoGrid();
});
<!-- Define the HTML div that will hold the Grid -->
<div id="grid">
</div>
$(document).ready(function(){
$("#grid").kendoGrid({
columns:[
{
field: "FirstName",
title: "First Name"
},
{
field: "LastName",
title: "Last Name"
}],
dataSource: {
data: [
{
FirstName: "Joe",
LastName: "Smith"
},
{
FirstName: "Jane",
LastName: "Smith"
}]
}
});
});
$(document).ready(function(){
$("#grid").kendoGrid({
groupable: true,
scrollable: true,
sortable: true,
pageable: true
});
});
$(document).ready(function(){
$("#grid").kendoGrid({
scrollable: {
virtual: true
}
});
});
You can reference an existing Grid instance via jQuery.data(). Once a reference has been established, you can use the API to control its behavior.
var grid = $("#grid").data("kendoGrid");