Given something along the lines of below I am trying to use the custom editor function of the grid to show a different control based on the data type. Data types are not limited to string, date, and boolean, but would also include some custom lists. In the demo for custom editors on fields the demo leads me to believe that the editor is column based, and cannot be row based. Is there a way to accomplish row based editors on the grid control?
<
div
id
=
"me"
>
<
div
id
=
"kendoGrid"
></
div
>
</
div
>
<
script
type
=
"text/javascript"
>
var viewModel = {
items: []
};
viewModel.items.push({ id: 0, dataField: new Date(2012, 1, 1), dataType: 'date' });
viewModel.items.push({ id: 1, dataField: 'any string', dataType: 'string' });
viewModel.items.push({ id: 2, dataField: true, dataType: 'boolean' });
$(document).ready(function () {
$("#kendoGrid").kendoGrid({
dataSource: {
data: viewModel.items,
batch: true,
schema: {
model: {
id: "id",
fields: {
id: { editable: false, nullable: false },
dataField: {}
}
}
}
},
columns: [{
field: "dataField",
title: "Attribute Value"
}],
editable:true
});
});
</
script
>