Split off from http://forums.asp.net/t/1408262.aspx/4/10?Multiple+Select+Checkbox+Checkbox+list+for+One+to+Many+relationship+using+Linq2SQL+and+ASP+Net+Dynamic+Data.
I 'm facing the same problem with L2S model + ManyToMany relation.
I found this sample, which works for edit mode, but I would also like to display ManyToMany field template in insert and view mode.
EF only work for M:M is you only have the two key in the join table. if you need to audit this table I suggest that you create a seperate audit table and then in your EF model use a sproc to update the seperate update table every time the join table is updated.
See my blog C# Bits | Twitter @sjnaughton Always seeking an elegant solution.
Things seem to have changed here? as far as design an Insert M:M it's a lot of work as you will have to hook up to the FormView's DataSources Inserted Event before you can add your M:M items as you need the PK id of your new item.
See my blog C# Bits | Twitter @sjnaughton Always seeking an elegant solution.
borutsla
Member
116 Points
59 Posts
Multiple Select Checkbox/Checkbox list for One-to-Many relationship using Linq2SQL and ASP.Net D...
Dec 09, 2011 08:44 AM|LINK
Split off from http://forums.asp.net/t/1408262.aspx/4/10?Multiple+Select+Checkbox+Checkbox+list+for+One+to+Many+relationship+using+Linq2SQL+and+ASP+Net+Dynamic+Data.
I 'm facing the same problem with L2S model + ManyToMany relation.
I found this sample, which works for edit mode, but I would also like to display ManyToMany field template in insert and view mode.
http://www.codeproject.com/KB/webforms/DynamicDataManyToManyFld.aspx?msg=4099176#xx4099176xx
Mark you said, that you have managed to display links in view mode? Could you please paste the code for view template?
Did you maybe solve this problem? Could you paste the code for the checkboxes in edit mode?
My mail: borut.slatinsek@kaliopa.si
Thank you in advance!
sjnaughton
All-Star
27308 Points
5458 Posts
MVP
Re: Multiple Select Checkbox/Checkbox list for One-to-Many relationship using Linq2SQL and ASP.N...
Dec 10, 2011 12:54 PM|LINK
EF only work for M:M is you only have the two key in the join table. if you need to audit this table I suggest that you create a seperate audit table and then in your EF model use a sproc to update the seperate update table every time the join table is updated.
Always seeking an elegant solution.
sjnaughton
All-Star
27308 Points
5458 Posts
MVP
Re: Multiple Select Checkbox/Checkbox list for One-to-Many relationship using Linq2SQL and ASP.N...
Dec 11, 2011 01:31 PM|LINK
Things seem to have changed here? as far as design an Insert M:M it's a lot of work as you will have to hook up to the FormView's DataSources Inserted Event before you can add your M:M items as you need the PK id of your new item.
Always seeking an elegant solution.