content jQuery
The jQuery object which represents the grid content element, which holds the scrollable content. Available only when scrollable
is set to true
.
Example - hightligh the cells within the content of the grid
<div id="grid"></div>
<br />
<button id="btn" class='k-button'>Highlight content's cells</button>
<script>
$("#grid").kendoGrid({
columns: [
{ field: "id", width:200 },
{ field: "name", width:800 }
],
scrollable: true,
dataSource: [ { id: 1, name: "Jane Doe" }, { id: 2, name: "John Doe" } ]
});
$("#btn").click(function(e){
var gridContent = $("#grid").getKendoGrid().content;
var cells = gridContent.find("td");
cells.css("color", "green");
});
</script>