Sending information from client-side JS back to server-side C#

2 posts, 0 answers
  1. Dave
    Dave avatar
    29 posts
    Member since:
    Aug 2010

    Posted 11 Aug 2015 Link to this post

    Hi,

    I'm new to Telerik MVC and while I've been able to find most of the things I need, I am wondering what is the standard way, once you have grabbed grid row data in a client-side javascript function, to pass the selected data back to your C# controller (or wherever that needs to go). I apologize if that concept is intuitive to everyone but me. My sample javascript function looks like the following:

    function getSelectedInformation(e){

         var workerID = e.id;

          var workerData = $('#gridHoldingWorkerInfo').data('kendoGrid').dataSource.data();

          var selectedAssignments = $('#gridHoldingWorkAssignments').data('kendoGrid').select();

    }

    I'll worry about iterating through the row information myself, but I read on a previous forum post where someone said to do an $ajax call, could someone please elaborate on this? By the way, on my grids I use Ajax to read the information and populate the grids. 

     

  2. Radoslav
    Admin
    Radoslav avatar
    1566 posts

    Posted 13 Aug 2015 Link to this post

    Hi Dave,

    Thank you for contacting us.

    Indeed you can try using jQuery to call the server-side action. More information about this approach can be found in this online resource.

    If you need further assistance, do not hesitate to contact us again.

    Regards,
    Radoslav
    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