[LLBLGen Pro 2.0, Self Servicing, SQL Server 2005]
I have some WinForms whose controls are data bound to the fields in an LLBLGen Pro entity, and which have the usual BindingSource and BindingNavigator. These particular forms don't use a grid, just individual textboxes and dropdown lists. I'm trying to implement delete using the button in the BindingNavigator.
I've looked through the forums here and found out about setting the AllowRemove property of the collection to true, calling AddForDelete on a UnitOfWork, etc, so I think I have a pretty good idea of what I need to do. What I'm not sure about is where to put the code that calls AddForDelete. I tried putting it in bindingNavigatorDeleteItem_Click, but that gets called after the item is removed from the collection, so the item is no longer around to pass to AddForDelete.
Where is the best place to put this code?
Thanks,
Wayne