joeliir wrote:
Ok so there is no easy way to do this using just the FormView and LLBLGenProDataSource? The issue with they way you mentioned is that multiple people could be adding at the same time. Should i just do this using code instead of the LLBLGenProDataSource?
That's not possible: the webform is for a single session, so you won't have the situation where multiple people are adding data to the same collection in a single datasourcecontrol.
The FormView calls ExecuteInsert or ExecuteUpdate on the datasourcecontrol, which then performs the action (either by itself or by raising PerformWork event) which then makes the control changed and the grid will refetch itself. If you really want the ID, you could also set LivePersistence to false and bind to PerformWork in the code behind, in which you will obtain the unitofwork object which contains the entity to save.