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
Original Post by Sandy (Imported from Ardevia Forum)
Hi,
What expression would I use on my display form to suppress the display of the sub-list, if there are no related items in the sub-list.
My lists are as follows:
Credit Card - Primary List
Credit Card Transaction - Sub-List
Thanks
Sandy
0
-
Original Post by Taras Lozynskyy (Imported from Ardevia Forum)
Hi Sandy.
- Get the webpart id of yout sublist webpart
- Go to BEHAVIOUR -> Visible Expression
- 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.
Comments
1 comment