Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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

C#
function MaskedPhoneNumber(container, options) {
              $('<input  data-bind="value:' + options.field + '"/>')
              .appendTo(container)
              .kendoMaskedTextBox({
                  mask: "~00-0000000000",
                  //value: "+91"
                  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.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900