- using jqGrid's ASP.NET MVC component
I have a jqGrid that is working splendidly except for one thing: it's a grid of Shoes that I must associate with a ShoeOwner (object names changed to protect the innocent)
So when I have a grid, it displays only the Shoes that a particular ShoeOwner owns. And when a user of the system decides to add a Shoe, before that request is sent, I need to add an additional parameter to the request that associates this new Shoe with this particular ShoeOwner. (otherwise the request will arrive at the Controller as just a lonely Shoe.)
Since I'm using the MVC component, I can't just stick this into the jqGrid() object when it's instantiated - it seems like I either need to:
add the parameter to the set of data that jqGrid will send along when an Add (or edit, for that matter) request is sent (right now it just sends the Shoe information) - the problem with this is that I'd have to programatically add the parameter to the jqGrid after it's instantiated, and so far I have not been able to do that, with either
editParams
oraddParams
.hook into an event right before the request goes out and add the additional information in then. The problem here is I haven't been able to find an event that reliably fires right before the "add a new row" request is sent.
Does anyone know how I can associate an entity added with jqGrid with the parent entity with which it belongs?