Alpha Video Training
Results 1 to 4 of 4

Thread: Cascade Delete in Linked Content Grids

  1. #1
    Member jeffsmith1961's Avatar
    Real Name
    Jeff Smith
    Join Date
    May 2013
    Location
    NC
    Posts
    32

    Default Cascade Delete in Linked Content Grids

    I've got a grid that has multiple child grids linked to it via "Linked Content". I'm using the "Single record edit" layout where the grid is hidden and only the "Details" view is shown. I do have the Parent ID field in the grid field list even though the grid is not shown.

    When I add records to a child grid the parent ID is automatically inserted into the child record as expected. However, when I delete a parent record, the the records in the child grids with that parent ID are not automatically deleted. Is this the normal behavior when deleting parent records? Thanks for any help.

  2. #2
    Member
    Real Name
    Terry Futrell
    Join Date
    Aug 2008
    Location
    Tennessee
    Posts
    127

    Default Re: Cascade Delete in Linked Content Grids

    Jeff,

    My understanding is that this is normal behavior for A5. I accomplish what you want by defining foreign key constraints in the underlying SQL database (MySQL in my case). There, I am able to cascade updates and deletes, to restrict deletes of the parent when child records exist, to replace the foreign key with nulls in the child records, or to simply do nothing to the child records.

    Terry

  3. #3
    Member
    Real Name
    Bruce Jonson
    Join Date
    May 2010
    Location
    New Zealand
    Posts
    420

    Default Re: Cascade Delete in Linked Content Grids

    Yes I agree with Terry, any Cascade Delete is the function of the underlying database.
    Otherwise you can do it from the front end (A5) , you can code a SQL DELETE query to delete the Child record from the parent from in the CanDeleteRecord() or AfterDeleteRecord() Server side events,

  4. #4
    Member jeffsmith1961's Avatar
    Real Name
    Jeff Smith
    Join Date
    May 2013
    Location
    NC
    Posts
    32

    Default Re: Cascade Delete in Linked Content Grids

    Thanks guys. That makes sense now. It just sort of threw me when A5 handled one direction and not the other. Appreciate the help.

Similar Threads

  1. Refresh Linked Grids/Content
    By azz211 in forum Application Server Version 10 - Web/Browser Applications
    Replies: 4
    Last Post: 12-16-2013, 03:20 PM
  2. How to remove the box around Linked Grids\Content
    By njguy in forum Application Server Version 11 - Web/Browser Applications
    Replies: 27
    Last Post: 09-25-2013, 01:01 AM
  3. Issues loading grids in Row Expander Linked Content
    By Progytech in forum Application Server Version 11 - Web/Browser Applications
    Replies: 11
    Last Post: 11-20-2012, 09:41 AM
  4. Linked content Grids not showing
    By Steve Workings in forum Application Server Version 10 - Web/Browser Applications
    Replies: 5
    Last Post: 07-13-2011, 12:29 AM
  5. Missing tabbed/accordian controls in Linked Grids/Content
    By dickerman7239 in forum Application Server Version 10 - Web/Browser Applications
    Replies: 3
    Last Post: 01-11-2010, 01:37 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •