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.
[Aspx]
@{
Html.Syncfusion().Grid<Grid_CS_Razor.Models.
Student >('GenericListGrid')
. . . .
.ClientSideEvents(eve => {
eve.OnRecordSelectionEvent('recordSelect'); // record selection event
})
}
Step#2:
[JavaScript]
function recordSelect(sender, args)
var record = Sys.Serialization.JavaScriptSerializer.serialize(args.record); // can get selected record values in args.record
$.ajax({
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:
[Controller]
[AcceptVerbs(HttpVerbs.Post)]
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:
Sample.zip
Please try this and let us know if you have any queries.
Regards,
Eswari S