I'm using MVC5.
I haven't been able to find an example of modifying parent / child or header / detail type of situation.
Currently I have a ViewModel that contains single data from a db record which is the parent or header info.
The ViewModel also contains an IEnumerable of the child record type.
In the view I have elements of the header or parent data and a Grid for the child data. How do I send the parent key when doing, say, a "create" of new data in the grid after save is pressed.
The grid is setup to use Ajax and updates are done in Batch.
The issue is that I see how I can bind the columns to the child records, but how do I get the parent id sent when "save" is pressed?
Thanks in advance.
I haven't been able to find an example of modifying parent / child or header / detail type of situation.
Currently I have a ViewModel that contains single data from a db record which is the parent or header info.
The ViewModel also contains an IEnumerable of the child record type.
In the view I have elements of the header or parent data and a Grid for the child data. How do I send the parent key when doing, say, a "create" of new data in the grid after save is pressed.
The grid is setup to use Ajax and updates are done in Batch.
The issue is that I see how I can bind the columns to the child records, but how do I get the parent id sent when "save" is pressed?
Thanks in advance.