I must do Cascade Deleting when I delete one Element in First lists, it's deletes me all bounded elements from another list's. I only must set a lookup fields at Adding Items. When I chose by editing its delete me all elements, but I don't know how to set lookap field and choose element. I find this article, but it isn't work: http://sarangasl.blogspot.com/2009/12/add-item-to-list-with-lookup-column.html, or I cant understand. Please help.
Edited:
Here of my shotes Code of items add:
SPListItem item = lstOtherList.Items.Add();
item["Kontrakt"] = properties.AfterProperties["Kontrakt1"];
item["Pracownik"] = properties.UserDisplayName;
item["Dzien"] = dzienStart;
item["Procenty"] = properties.AfterProperties["Procenty"];
I made too Look Up Column caled "ID Czas Pracy Wpisy".
Edited 13:36
I have got two List's: First list has got elements:
Contract | Worker | Day Start | Day Stop | Percent
--------------------------------------------------------
Example Con1 | Paul | 2012-10-12 | 2012-10-15 | 1/8
Secound List should have
Contract | Worker | Day | Percent
------------------------------------------------
Should Have Con 1 | Paul | 2012-10-12 | 1/8
Con 1 | Paul | 2012-10-13 | 1/8
Con 1 | Paul | 2012-10-14 | 1/8
Con 1 | Paul | 2012-10-15 | 1/8
So In Secound lists I want to have a for examle name of contract which can't repeat as lookap fild, but i must set ap this value when I make a Secound List.