cellDataBound
Event fires after insert of a cell in the grid during the loading of the data
Parameters
Name | Type | Description |
---|---|---|
e | {object} | event data |
$wrapper | {object} | the cell wrapper presented as jquery object |
id | {string} | the id of the record |
column | {object} | the column configuration data |
record | {object} | the data of the row record |
Examples
<table id="grid"></table>
<script>
var grid = $("#grid").grid({
dataSource: "../Grid/GetPlayers",
columns: [ { field: "ID" }, { field: "Name" }, { field: "PlaceOfBirth" }, { field: "IsBulgarian", title: "Is Bulgarian" } ]
});
grid.on("cellDataBound", function (e, $wrapper, id, column, record) {
if ("IsBulgarian" === column.field) {
$wrapper.text(record.PlaceOfBirth.indexOf("Bulgaria") > -1 ? "Bulgarian" : "");
}
});
</script>