Here's the setup (excuse no code the setup doesn't post well):
table > link table > table (M:M)
link table is composite key with constraints
linq2sql DataContext of above schema
object datasource bound to Business Logic class (exposing the LINQ2SQL class methods) (ObjDs1)
ListView with DataSourceId to above objds (Lv1)
object datasource with control parameter aimed at above ListView SelectIndex (ObjDs2)
ListView aimed at above objds (Lv2)
select item in Lv1 > postback > Lv2 displays correct records for the M:M
On Delete (heres the fun) the delete fires, the data is deleted and constraints work (no error) BUT Lv2 still displays the deleted data...
I have called Page_PreRender Page.DataBind() just to make sure every control in the heirachy is rebound but to no avail...
I also noted that the OnDeleted event in the ObjDs2 has an AffectedRows of -1.... but the data is definitely deleted.
View Complete Post