Click here to Skip to main content
15,313,985 members
Please Sign up or sign in to vote.
0.00/5 (No votes)

I need to get WebGrid selected row values into Controller.

this is my webgrid

  var g_style = new WebGrid(source: Model,
    rowsPerPage: 10);
tableStyle: "gridTable",
headerStyle: "gridHead",
footerStyle: "gridFooter",
rowStyle: "gridRow",
alternatingRowStyle: "gridAltRow",
        columns: g_style.Columns(
        g_style.Column(header: "UserName", format: @item => item.UserName),
        g_style.Column(header: "Role", format: @item => Html.DropDownList("Role", (IEnumerable<SelectListItem>)ViewData["Role"], "--Select--" })),
        g_style.Column(header: "Approve", format: @item => Html.ActionLink("Approve", "Approve", new { id = item.UserID }))


here i need to get the dropdown selected value and the action link value into the controller...

Please help me....

Thanks in advance...
Updated 29-Jul-15 22:34pm
Member 13396084 24-Oct-17 1:44am
am having dropdownlist as a column of webgrid when i choose dropdownlist value i want to pass selected row value at js function or cotroller at mvc

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900