This is a migrated thread and some comments may be shown as answers.

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

1 Answer 146 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 11 Aug 2015, 03:02 PM

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. 

 

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 13 Aug 2015, 07:31 AM
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
Tags
Grid
Asked by
Dave
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or