Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
410
Send igGrid datasource to Controller action
posted

How can I send the igGrid datasource to the Controller action MVC 3?

 

Thanks

  • 24671
    Verified Answer
    posted

    Hi,

    is there any reason you would like to post the whole data source to the server? If you would like to only send the changed data, you can use the transaction api of the data source / grid. 

    Otherwise, if you would like to send the whole datasource, here is one way to do this:

    var dataSource = $("#grid").data("igGrid").dataSource.data();

    $.ajax({
      type: 'POST',
      url: <your controller URL>,
      data: dataSource,
      success: successCallback,
      dataType: "json"
    });
    Hope it helps. Thanks,
    Angel