Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parent/Child Editing Ok, Not Adding
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01423691
Message ID:
01423865
Views:
59
I got it to work, but it's kludgy and I'm sure not the proper way.

The base of the problem seems to be that the ParentKeyValue property wasn't getting properly set in the child object before its Save. So I disabled the autoSaveOnParentSaved setting, and changed my save to this:
        if (lReturn)
        {
            // Kludge! For new links
            if (this.oMemberLink.Entity.numIndID == null || this.oMemberLink.Entity.numIndID == 0)
            {
                String cIdField = (lNewContact ? "newId" : "numIndId");
                int iNewMemberId = Convert.ToInt32(this.oContact.DataSet.Tables[0].Rows[0][cIdField]);
                this.oMemberLink.Entity.numIndID = iNewMemberId;
                
                this.oMemberLink.SaveEntity();
            }
            Response.Redirect("findName.aspx?txtFind=" + this.txtLastName.Text);
        }
And hurray, it works. Now, onto the next big problem (trying to get mmCheckBoxLists to populate properly...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform