Steve7423
asked on
MVC Capture the selected item id clicked by the user
First time working with MVC. I've made good progress but I need to know how to handle the issue of capturing a specific row item the user clicked. The attached EESelected Item_Problem Pic shows the screen. Obviously there are more items on the screen but for simplicity I showed just one to get the point across. When the user clicks the 'Execute' it fires the action 'Execute', as seen in the attached Code_Debug_Pic. I need this action to contain iether the specific item and id the user clicked. from here I need to look up corosponding records related to the item id. the issue is how do I capture the item info from the screen when the user clicks it?
If you need more info let me know.
EE-Selected-Item-Problem.bmp
Code-Debug-Pic.bmp
If you need more info let me know.
EE-Selected-Item-Problem.bmp
Code-Debug-Pic.bmp
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
So, mark your comment as Answer then!
So, mark your comment as Answer then!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
In that case, you can assign some points to me with a NOTE to Administrator!!!
In that case, you can assign some points to me with a NOTE to Administrator!!!
ASKER
The steps outlined in my comment show exactly what the problem was so others can combine roopeshreddy's link and my comment, in order to see the connection.
ASKER
WebGrid grid = new WebGrid(Model.Where(d => d.Disc_Name == discName),selectionFieldNa
<pre>@grid.GetHtml(
fillEmptyRows: false,
alternatingRowStyle: "alternative-row",
headerStyle: "grid-header",
footerStyle: "foot-grid",
mode: WebGridPagerModes.All,
firstText: "<< First",
previousText: "< Previous", nextText: "Next >",
lastText: "Last >>",
columns: new[] {
grid.Column("Disc_Name",he
grid.Column("Software", canSort:false),
grid.Column(
"",
header: "Action",
format: @<text>
@Html.ActionLink("Execute"
@Html.ActionLink("Execute"
</text>
)
})
You'll notice I've added the grid.selectedrow to the ActionLink above. I have no idea if this is correct or how it should be done.