kendo ui - Appending a new row in kendoUI gives TypeError: Cannot read property 'replace' of undefined -
i needed append new row kendo grid @ bottom, on pressing button have template defined 1 of columns , getting error in template saying "cannot read property 'replace ' of undefined".
here code trying utilize above operation:
var datasource = grid.datasource; var total = datasource.data().length; datasource.insert(total, {}); datasource.page(datasource.totalpages()); grid.editrow(grid.tbody.children().last());
i want new grid in editable mode.any kind of help please
i believe 'replace' 1 of field in yourdataitem? have define new row default values while grid creation:
$("#grid").kendogrid({ datasource: { data: data, schema: { model: { fields: { replace: { defaultvalue: "your value", } } } } } ... });
or when insert new row:
datasource.insert(total, { replace : "your value" });
kendo-ui
No comments:
Post a Comment