Insert detail line items at the same time as master line item is created
Technology: ASP.Net, Telerik, C#4, linq2sql
I have a master-detail grid that displays, updates and inserts OK. I would like to add the capability to add detail records to a new master record, then save both. Essentially, it makes the user experience nicer - now, they have to add a master record, save it, then expand the (empty) detail gri开发者_高级运维d and insert a record.
Is there an easy way to do this?
Thanks!
I'm not exactly clear on what you're asking but what I think you want to do is this:
Insert the new Master Record.
Select the ID of the new record (or whatever is the PK)
Insert the new Detail Record with the FK to the new Master
You can do all of these things programatically in sequence so the user won't have to do it manually. Not sure if it can be done directly from a databound grid, but someone else may have insight on that.
Hope that is of some help...
精彩评论