This HTML snippets helps you save time by reusing your editable List View into your Read-only page by hiding add/edit/delete toolbars.
Very very useful for quickly churning out apps! 🙂
You can use the same ListView below (With the add/edit/delete buttons), into your read-only page.
Do note that you still need to call the “Specify Edit State for View and Form Controls” rule. The only problem with OOTB is that it does not remove the buttons.
Hide the toolbar by adding the following snippet:
<style>.grid-toolbars, .grid-body .action-row{display:none;}</style>
NOTE: Warning, this removes the toolbars to all List Views in the form. Apply an extra selector to restrict to one list view only.
Cool tip: If you often use this script, add it as a variable in your environment library. next time, just drag and drop it into a datalabel, and you’re done!
[In case you don’t know: How to insert html/js/css into a smartform]
Hi, this is a great article. could you please show us how to add a selector so that we can hide the toolbar only on the selected control?
AK
LikeLike