Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8846063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:53:11+00:00 2026-06-14T11:53:11+00:00

I’m working with the KendoUI version 2012.3.1114 with jQuery 1.8.2 . I’m using MVC4

  • 0
  • I’m working with the KendoUI version 2012.3.1114 with jQuery 1.8.2.
  • I’m using MVC4 and my methods are routing throw a Controller on fetch and API Controller for post. These are working correctly and I’ve validated that the returned entity contains the correct populated values (Id, Sender, Subject)
  • I’m NOT using the MVC razor version.

The Issue

The issue I’m having is my object is saved and is returned correctly, but when it’s passed through the kendo.web.min.js file on the “options.success” method, the Model doesn’t seem to populate the Id field with the new value.

Here is the js that is working with KendoGrid

dataSource = new kendo.data.DataSource({
        transport: {
            read: function (options) {
                $.ajax({
                    dataType: 'json',data: options.data, url: 'messagesfetchmessages', cache: false,
                    success: function (result) {   
                        options.success(result);
                    }
                });
            },
            create: function (options) {
                options.data.Id = 0;
                debugger
                $.ajax({
                    dataType: 'json',data: options.data,type: "POST",url: '/api/messages',cache: false,
                    success: function (result) {
                        //var model = kendo.stringify(result)
                        debugger
                        options.success(result);
                    },
                    error: function (result) {
                        options.error(result);
                    }
                });
            },
        },
        batch: true,
        pageSize: 30,
        schema: {
                    data: "data",
            model: {
                id: "Id",
                fields: {
                    Id: { editable: false, nullable: true },
                    Sender: { validation: { required: true } },
                    Subject: { validation: { required: true } },
                }
            }
        }
});


$("#grid").kendoGrid({
    dataSource: dataSource,
    pageable: true,
    height: 400,
    toolbar: ["create"],
    columns: [
        { field: 'Id', width: "10px" },
        { field: 'Sender', width: "50px" },
        { field: 'Subject', width: "50px" }
        { command: ["edit", "destroy"], title: " ", width: "210px" }],
    editable: "popup"
});

Here’s a couple screen shots of the results:

Here is the result returned from the successfull save
enter image description here

Below is a screen shot of the result after KendoUI calls ‘success’ and passes an object to the jquery deferred function (notice that the model Id is null):

success: function (t) {
    e.resolve({
        response: t,
        models: n,
        type: i
    })
},

enter image description here

Surprisingly, banging my head against the keyboard only hurts the keyboard….any pointers would greatly be appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T11:53:12+00:00Added an answer on June 14, 2026 at 11:53 am

    The issue ended up being how the schema was defined. Since I had set the schema data results to be returned as “data” in the following. All results must be returned the same way for the bindings to work.

        var schema  = {
            data: "data",
            total: 'total',
            model: MessageModel,
            //http://docs.kendoui.com/api/framework/datasource#schema-object
            errors:  function(e,a,b) {                    
                if(e && e.responseText){
                    alert(e.responseText);
                    debugger
                }
            },
            parse: function(response) {
                if(!response.total){
                    debugger
                }
                //response.data.DateCreated = new Date();
                return response;
            },
            batch: false,
            gridcolumns: columns
        }
    

    So, on the success function from the post, the code looks like this:

    success: function (result) {
        options.success({
            data: result
        });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading a book about Javascript and jQuery and using one of the
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have thousands of HTML files to process using Groovy/Java and I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.