javascript - Kendo grid field value needs to be different than displayed text -
javascript - Kendo grid field value needs to be different than displayed text -
i have grid in kendo next columns:
columns: [ { field: "groupid", hidden: true}, { field: "name", title: "group name"}, { field: "description", title: "description"}, { field: "users.length", title: "assigned users" }] the datasource has schema:
schema: { model: { id: "groupid", fields: { name: {editable: true}, description: {editable: true}, users: {editable: false}, } } } my problem: not want users editable, has editable: false property. doesn't seem binding users.length field.
which of next correct/implementable approach this? i'm new kendo, i've had no luck figuring out on own.
can have field name refer users, , display value users.length? can bind field in schema users.length somehow?
set field whatever (not users.length) can not defined field. show content using template. like:
columns: [ { field: "groupid", hidden: true}, { field: "name", title: "group name"}, { field: "description", title: "description"}, { title: "assigned users", template: "#= users.length #" } ] when not define field attribute, automatically becomes not editable still have access fields of model.
javascript kendo-ui kendo-grid
Comments
Post a Comment