Greetings of the day to all,
How to add MaskedTextBox,DropDownList and AutoComplete in Kendo grid Using MVVM ???
using dataSouce I can,but in MVVM i don't know how to add.
Here i'm sharing my code using dataSource
{ field: 'PhoneNumber', title: 'PhoneNumber', editor: MaskedPhoneNumber },
now i'm calling this function
function MaskedPhoneNumber(container, options) {
$('<input data-bind="value:' + options.field + '"/>')
.appendTo(container)
.kendoMaskedTextBox({
mask: "~00-0000000000",
rules: {
"~": /[+]/
}
});
}
this is fine. Now i'm sharing my Code in MVVM
data-role="grid"
data-sortable="true"
data-editable="true"
data-toolbar="['create','save','cancel']"
data-reorderable="true"
data-resizable="true"
data-columns=' [
{ field: "PhoneNumber", title: "PhoneNumber" },//here how can i add editor
{ field: "Country", title: "living country", width: 180 },
{ field: "StateName", title: "State Belongs to" },
{ command: ["destroy"]}] '
data-bind="source: personsDataSource">
help me how to solve this,
Thanks in advanced.