Skip to main content

Search

Display Form -  Suppressing sub-list if no sub-list entries - I would like to suppress the sub-list on my display form if there are no sub-list items applicable

Comments

1 comment

  • ArdeviaForum

    Original Post by Taras Lozynskyy (Imported from Ardevia Forum)

    Hi Sandy.

    1. Get the webpart id of yout sublist webpart
    2. Go to BEHAVIOUR -> Visible Expression
    3. Insert this code into Expression Builder

        Code:

     

    var webpartId="your webpart id";
        var webpartSelector = "[ard-webpart-id=" + webpartId + "]";
        var gridController = jQuery(webpartSelector).data('Controller');
        var grid = gridController.InstanseData.GridControl;
    
        return grid.GetSpCsrRenderCtx().ListData.Row.length > 0 ;
    
    0

Please sign in to leave a comment.