DataSource set to another variable

2 posts, 0 answers
  1. Josh
    Josh avatar
    7 posts
    Member since:
    Jun 2013

    Posted 16 Apr 2015 Link to this post

    I have a MVVM page where upon loading, it make an ajax request to retrieve a model and set the viewmodel to the retrieved model.  This model has a few strings and includes a LIST<rates> type.  The form is bound to the model and includes input boxes for the strings plus an EDITABLE grid for the List<rates>.  My issue is binding the grid to the List<rates> AND allowing it to be editable with a schema.  How do I setup the Datasource to point to the List<rates> for the grid, and include a schema to allow for inline editing?  I was trying to avoid having a separate remote datasource call since I already have the data from the initial setup.

    My model is like this:

    var existingtimeKeeperRatesModel ={
        id: "TimeKeeperName",
        fields: {
            "TimeKeeperName": {
                type: "string",
                editable: false
            "StandardRate": {
                type: "number",
                editable: false
            "FromRate": {
                type: "number",
                editable: false
            "ToRate": {
                type: "number",
                editable: true
            "RateTerminateDate": {
                type: "date",
                editable: true,
                parse: function (value) {
                    return kendo.parseDate(value, "MM-dd-yyyy");



  2. Alexander Valchev
    Alexander Valchev avatar
    2887 posts

    Posted 20 Apr 2015 Link to this post

    Hi Josh,

    In case you want the dataSource to automatically parse the data list you should pass it through custom transport function. That said you should configure dataSource with local CRUD operations as explained in this help topic:
    Please test the suggested approach and let me know if you have any further questions.

    Alexander Valchev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top