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
Hello Tony,
Thank you for posting in our forums.
First of all I would recommend you waiting for the editing funtionality which is currently CTP
https://www.igniteui.com/grid/overview
Regariding the implementation of your scenario you can iterate through the cells of the selected row
and get their values.
How to get specific cell value you can find more code snippets here:
https://www.igniteui.com/grid/grid-api-events
You can find more information regarding the selection API here:
https://www.igniteui.com/grid/selection
Please refer to the jQuery API for more information :
https://www.igniteui.com/help/api/2013.2/
Let us know if you need further assistance.
Thanks