MVC .NET Using Datatables CRUD?

MVC .NET Using Datatables CRUD?

john.wright.ctr@usmc.miljohn.wright.ctr@usmc.mil Posts: 2Questions: 1Answers: 0

I'm new to Datatables. I've using the Gird functionality ...and it's great. I'm having some problems "wiring up" the Add & Edit functionality. The .NET Sample project uses Web API design pattern. I don't use that exact pattern in many of my systems. My question is this: Will Datatables ONLY work when receiving a IHttpActionResult response and sending the HttpContext.Current.Request? Can it work properly if I return just a JSON response (JsonResult)? I can capture the events and create my own Edit Popup no problem....but I'd like to use ALL Datatables intrinsic functionality....that I'm having some "issues" with

Answers

  • allanallan Posts: 61,723Questions: 1Answers: 10,108 Site admin

    Will Datatables ONLY work when receiving a IHttpActionResult response and sending the HttpContext.Current.Request?

    Editor.Process() will actually take a few different parameter types:

    • Process(IEnumerable<KeyValuePair<String, String>>) - Process a request from the Editor client-side to get / set data. For use with WebAPI's 'FormDataCollection' collection
    • Public method Process(NameValueCollection) - Process a request from the Editor client-side to get / set data. For use with MVC's 'Request.Form' collection
    • Public method Process(HttpRequest) - Process a request from the Editor client-side to get / set data. For use with an HttpRequest object
    • Public method Process(DtRequest) - Process a request from the Editor client-side to get / set data.

    Can you get your data in one of those forms?

    Allan

This discussion has been closed.