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 selected row in a grid

Thread ID:





118424 Mar 6,2015 11:37 PM UTC Jun 2,2016 06:59 AM UTC ASP.NET MVC 3
Tags: Grid
Doug Matulis
Asked On March 6, 2015 11:37 PM UTC


I have a grid that is in a form with other controls.  When the submit button is pressed and control returns
to the Post method in the controller, how do I pass back the selected row in the grid to the controller method?


Madhu Sudhanan P [Syncfusion]
Replied On March 9, 2015 01:06 PM UTC

Hi Doug,

Thanks for using Syncfusion products.

We can achieve your requirement with the following steps. Please refer them.

1. Place a hidden type input element in the form as follows.


@using (Html.BeginForm())



        <input type="hidden" name="GridData" id="GridData" value=""/>

        . . . .


        <input type="submit" value="Submit" />



2. Retrieve the selected row of grid using RowSelected event and update it in the hidden element.

@using (Html.BeginForm())



        <input type="hidden" id="GridData" value=""/>




    . . . . . .

        .ClientSideEvents(evt => evt.RowSelected("onRowSelected")))

        <input type="submit" value="Submit" />



function onRowSelected(args) {

        //Retrieve the selected recrods of the grid

        var result = this.getSelectedRecords();

        //stringify and place the grid`s selected record as value of hidden element



3. Now on form submit, we can retrieve the selected row data at the controller side using the name “GridData”.


Please let us know if you need further assistance.


Madhu Sudhanan. P

Ashok Bhupathy
Replied On June 1, 2016 04:05 AM UTC

Hi am getting null for "GridData" when post the form data, could you please resolve this issue.

Ragavee U S [Syncfusion]
Replied On June 2, 2016 06:59 AM UTC

Hi Ashok, 

We are able to reproduce the issue if the name attribute for the hidden element is not specified. So please ensure if you have specified the “name” attribute for the hidden element. 

For your reference, we have created a sample which can be downloaded from the below location. 

Ragavee U 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