Grid Data Update/Delete

4 posts, 0 answers
  1. Allan
    Allan avatar
    34 posts
    Member since:
    Aug 2015

    Posted 09 Nov 2015 Link to this post

    I am in need of some help, I'm building a web application that uses the KendoUI, specifically the grid to display data.  I've used the entity framework under a "database first" scenario, this means that the models are created for me for all the tables in my database.  I'm displaying this data in the Kendo grid but I can't edit or delete any of the entries (inline with ajax).  If you delete an item it returns when you regresh the screen and the update button does nothing.  I suspect this is because we have no functions to handle these events.

    Is there anyway I can utilise the already created scaffolded controller to do this as it already as an edit and delete function in it.

     Any help would be appreciated.

  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2566 posts

    Posted 11 Nov 2015 Link to this post

    Hello Allan,

     

     

    Multiple runnable samples using the Kendo UI Grid and dataBinding are available here, please take a look as I believe they will help you start the project:

     

    https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master/grid

     

    Regards,
    Kiril Nikolov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Mark
    Mark avatar
    17 posts
    Member since:
    Dec 2010

    Posted 13 Nov 2015 in reply to Allan Link to this post

    Allan:

    This may not be your issue, but I had a similar problem yesterday.  I am just getting started with the Telerik MVC stuff, and I created a grid that would read data (from database-first EF model) but would not add or update.  No errors, just would not do anything.

    I tried to add a record to my table manually in SSMS and got an error (Primary key cannot be null) because the primary key on the table ("Id") was not set as an Identity field, which is what I had indented.  I changed the table, updated the EDMX in my project and then the grid worked. I was able to add, edit and delete.

    Note that this I used the Kendo grid scaffolding helper in Visual Studio 2015 to do this and did not have to add or change any code manually to make it work.

    Good luck.

    Mark

     

  5. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2566 posts

    Posted 17 Nov 2015 Link to this post

    Hello Mark,

     

    Thank you for sharing this, I am sure it will be helpful for many other users!

     

    Regards,
    Kiril Nikolov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET MVC is VS 2017 Ready