Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2225
Edit Selected Row Example
posted

I'm a winforms developer, but now find myself having to write for the web. I've done a few simple sites in the past, but this one is way more complex. Since I'm a noob anyway, I went with MVC3 and Razor. But if I can't figure out how to do this soon, I'm just going to skip the grid and use a table... or skip MVC all together and go to web forms.

I'm using MVC3 with Razor view engine.

Since there is no built in CRUD functionality with the grid, I'm looking to simply add a link that will allow the user to Edit, Delete, or View Details for the currently selected row.

I have a grid that is displaying a list of <object> and I can select individual rows just fine. However, I'm unsure of how to proceed. I found the information at http://help.infragistics.com/Help/Doc/jQuery/2011.1/CLR4.0/html/igGrid_Selection.html

to be insufficient for my level of experience.

While I can bind to the iggridselectionrowselectionchanged event with javascript, and I can alert in the Handler function to show that it is being hit when a row is selected, I'm not sure where to go from here. I know very little javascript. I just want to hit a specified action in the current controller and have available the currently selected row.

Can anyone provide me with a snippet or two demonstrating this type of functionality? Is there a better way than what I'm trying to do, or an alternative that doesn't involve using Javascript?

Thanks,
Tony