Implementing Datatable inline editor in ASP.NET MVC

Implementing Datatable inline editor in ASP.NET MVC

Priyanka PPriyanka P Posts: 2Questions: 1Answers: 0

Hi,

Has anyone implemented simple inline editor in ASP.NET MVC? I ran into errors when I tried to make an ajax call to the controller and bind it's response (JSON objects) to the datatable. I am now testing with the static data and I want to know more about edit, create and delete operations, how are the requests sent? I am not connecting to the database through the Model classes. I write queries to INSERT/UPDATE the data. Please help me out if anyone has implemented anything similar to this. I have been working on this from the past 2 days and am not getting anywhere.

Answers

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Hi @Priyanka P ,

    Is this using Editor? There are several examples on how to do it, such as this one here.

    Cheers,

    Colin

  • Priyanka PPriyanka P Posts: 2Questions: 1Answers: 0

    Hi @colin,

    Yes, I am using Editor. I have checked out the examples. The way I have set up my project is different. Therefore I can't use the controller methods similar to those given in the examples. Datatables' editor takes care of CRUD operations based on the request type. I need to interpret the request type and perform some other operations in between. If you have done something like that, please walk me through the process. I'd very much appreciate your help.

    Thanks,
    Priyanka

  • allanallan Posts: 61,436Questions: 1Answers: 10,049 Site admin

    Hi Priyanka,

    If you can't use the .NET libraries that we provide, then the information to implement your own is available here and I'm happy to answer any questions you have about it. We don't provide separate code to implement that - that's what our libraries do :).

    Allan

  • tajtaj Posts: 20Questions: 5Answers: 0
    edited July 2021

    Hi @allan / @colin can I use editor for c# (cshtml), if Yes then how's it please help me.

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Yep, we support the .NET libraries - please see this section of the manual on how to install/get started/etc.

    Colin

Sign In or Register to comment.