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 7457955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T13:23:17+00:00 2026-05-29T13:23:17+00:00

Been trying to do an update on a Kendo grid and I’m having issues.

  • 0

Been trying to do an update on a Kendo grid and I’m having issues.

I’m using Rails as the back-end and when I do the update, the server seems to be showing that everything worked:

      Started PUT "/" for 127.0.0.1 at 2012-02-12 17:28:19 -0600
          Processing by HomeController#index as
          Parameters: {"models"=>"[{\"created_at\":\"2012-02-08T17:34:50Z\",
         \"first_name\":\"Milla\",\"id\":2,\"last_name\":\"sfasfsdf\",\"password\":\"\",
        \"updated_at\":\"2012-02-08T17:34:50Z\",\"user_name\"
        :\"\"}]"}
        Rendered home/index.html.erb within layouts/application (3.0ms)
        Completed 200 OK in 89ms (Views: 88.0ms | ActiveRecord: 0.0ms)

However, when I refresh the view, nothing has changed. When I checked the database, of course no changes had taken place there either.

I went through the documentation here about how to do edits in the grid: http://demos.kendoui.com/web/grid/editing.html

And I watched Burke Hollands video about how to set up the grid to work with Rails: http://www.youtube.com/watch?v=FhHMOjN0Bjc&context=C3f358ceADOEgsToPDskKlwC22A9IkOjYnQhYyY9HI

There must be something that I haven’t done right, but I’m just not seeing it.

Here’s my code that works with the Kendo stuff:

           var User = kendo.data.Model.define({
                id: "id",
                fields: {
                    first_name: { validation: { required: true } },
                    last_name: { validation: { required: true } }
                }
            });

            var UsersData = new kendo.data.DataSource({
                    transport: {
                        read: {
                            url: "/users.json"
                        }, 

                        create: {
                            url: "/users/create.json",
                            type: "POST"
                        }, 

                        update: {

                            type: "PUT"
                        },

                        destroy: {
                            type: "DELETE"
                        },

                        parameterMap: function(options, operation) {
                            if (operation !== "read" && options.models) {
                                return {models: kendo.stringify(options.models)};
                            }
                        }


                    },

                    batch: true,

                    pageSize: 5,

                    schema: {
                        model: User
                    }


                });             

                $("#users-grid").kendoGrid({

                    dataSource: UsersData,
                    navigatable: true,
                    editable: true,                    
                    selectable: true,
                    pageable: true,
                    sortable: true, 
                    toolbar: ["create", "save", "cancel"],

                    columns: [
                    {
                        field: "first_name",
                        title: "First Name"
                    },
                    {
                        field: "last_name",
                        title: "Last Name"
                    },



                    ]


                });  
  • 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-05-29T13:23:18+00:00Added an answer on May 29, 2026 at 1:23 pm

    Some more research and I’ve got it working like this…

    I added a route to override the 7 RESTful routes that Rails gives you by default. In your Routes.rb files, add this line…

    match 'users' => 'users#update', :via => :put
    

    Which basically says we are going to handle all puts by going to the update definition on the controller.

    Now in the controller definition, you want to handle the update a bit differently since it’s not RESTful. You need to first parse the JSON that you are sending via the parameterMap and then iterate through the objects updating with the object attributes…

    def update
      respond_to do |format|
        @users = JSON.parse(params[:models])
        @users.each do |u|
          user = User.find(u["id"])    
          unless user.nil?
              user.update_attributes u
          end
        end
        format.json { head :no_content }
      end
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to update some properties with KVC. The properties have been synthesized. This
I have been trying to implement Win32's MessageBox using GTK. The app uses SDL/OpenGL,
I have been trying to update a TextView field, when i Tap on the
I've been trying to update a field in MySQL database but I'm getting an
I have been trying for 3 hours to update a new .xap for my
I've been trying to update a total price when someone changes the select option.
So far I have been trying to update the twitter profile bg image thr
I have been trying to use an update trigger which checks for the title_id
I've been trying to create a route that maps to /Controller/Update/Customer/1 without success, I've
I have been trying to run rake but it seems that ever since I

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.