wijmo.grid.c1band Namespace > options type : cellFormatter Option |
Javascript (Usage) | |
---|---|
$(function () { // Get value var returnsValue; // Type: Function returnsValue = $(".selector").c1band("option", "cellFormatter"); // Set value var newValue; // Type: Function $(".selector").c1band("option", "cellFormatter", newValue); }); |
Javascript (Specification) | |
---|---|
|
// Add an image which URL is obtained from the "Url" data field to the column cells. $("#demo").wijgrid({ data: [ { ID: 0, Url: "/images/0.jpg" }, { ID: 1, Url: "/images/1.jpg" } ], columns: [ {}, { cellFormatter: function (args) { if (args.row.type & wijmo.grid.rowType.data) { args.$container .empty() .append($("<img />") .attr("src", args.row.data.Url)); return true; } } } ] });