Using ASP.NET C# MVC3 with razor templates, I have a question:
In my DevExpress GridView
, I can select rows. How can I pass the selected rows into a JavaScript variable? Also, if I select multiple rows simultaneously, is there a way to get them in an array?
Edit: Thanks to a comment, I now have the following 'JQuery' function:
$(function () { // Delete function
$('#select').click(function () {
var Delete = confirm("Are you sure you want to delete the selected records?");
if (Delete) {
// Delete Function
var test = ;
alert(test);
} else {
// Nothing
}
});
});
I am trying to retrieve the Id of the selected rows and store it in the variable 'test'. I attempted to use GetSelectedFieldValuesCallback and GetSelectedFieldValues, but it is not working as expected. If anyone has an example they could provide, I would greatly appreciate it.