We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Returning the select grid row to controller's post method

Thread ID:





110420 Aug 1,2013 07:53 PM UTC Aug 6,2013 04:30 AM UTC ASP.NET MVC (Classic) 1
Tags: Grid
Doug Matulis
Asked On August 1, 2013 07:53 PM UTC

Hello, I am using the Grid controls in a ASP.NET MVC 4 application and can figure out how to get the selected row from each grid in my post method on my controller class.  Any help us greatly appreciated.

I have tried using the .ClientSideEvents property for the grid as follows but it does nothing:
.ClientSideEvents(r => r.OnRecordSelectionEvent("ContractorRecordSelection"))

<script type="text/javascript"> 

    function ContractorRecordSelection(sender, args) {
        var selectedRows = sender.selectedRows();
        var a = args.record.Code;


Eswari S [Syncfusion]
Replied On August 6, 2013 04:30 AM UTC

Hi Doug,

Thank you for using Syncfusion products.

Your requirement can be achieved in “OnRecordSelectionEvent”. Please refer to the following steps in the sample:          


Step #1: Add client side event for RecordSelection.



    Html.Syncfusion().Grid<Grid_CS_Razor.Models. Student >('GenericListGrid')

                    . . . .

    .ClientSideEvents(eve => {

        eve.OnRecordSelectionEvent('recordSelect');  // record selection event





function recordSelect(sender, args)

    var record = Sys.Serialization.JavaScriptSerializer.serialize(args.record);   // can get selected record values in args.record


        type: 'Post',

        url: 'Home/GetRecords',

                 data: { rec: record },  // send serialized data to controller through ajax post

        dataType: 'html',

        success: function (data) {

            return data;




Step #3:



        public ActionResult GetRecords(string rec)  // retrieve the data here and desterilize it


            Student ord = new JavaScriptSerializer().Deserialize<Student >((string)rec);  // can get selected record values here

            return RedirectToAction('Index');


For your convenience ,we have prepared the sample and the same can be downloaded from the following link:



Please try this and let us know if you have any queries.



Eswari S


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon