how to get selected checbox row particular column value in grid.mvc

Apr 6, 2016 at 8:00 AM
I have grid in my cshtml page.

I need to have the checkbox has a column in grid with header check box.

if I select a check box and click on the button i have to get he selected rows particular column value.

How to acheive this,

Thanks in advance.
Apr 7, 2016 at 1:23 PM
Thanks if any one tried.

I have found the solution for this.

function GetSelectedIds()
        {
            var selectedItems = [];
            var row = $('#providerGridId table tbody tr');
            row.each(function (index, value) {
                var curItem = {};
                //check whether the check box is checked
                var result = $(this).find(':checkbox').is(':checked');
                //if checked store the value for the delete or edit
                if (result === true) {
                    curItem["Id"] = $(this).find('td').siblings(":first").text();

                    selectedItems.push(curItem["Id"]);
                }


            });

            return selectedItems;
      }
I have given the Id for the div that have the grid.

and done the above code to support this.