
Along the same lines as what I covered in a previous article on adding new rows in an editable detail to the bottom of the list, if your detail represents some sort of ordered or sequential items, you might want to also remove the ability to sort the detail as well. There are some details in Creatio where this is the case, such as the Sections in a Workplace when editing a Workplace in the Workplace setup.
Option 1: Removing the Column Headers
What the out of the box areas do to prevent sorting, such as the detail for the Sections in a Workplace, is to remove the column headers. You can do this by adding the following to the diff in your detail schema.
diff: /**SCHEMA_DIFF*/[ { "operation": "merge", "name": "Detail", "values": { "wrapClass": ["hide-grid-caption-wrapClass"] } } ]/**SCHEMA_DIFF*/
This will remove the column headers for your detail list. However, I don’t really like this approach for all cases. Instead, you can do the following method.
Option 2: Disable Column Header Click and Remove Sort Action Menu
This alternative route will remove both the “sort” menu under the three-dot button, and will also make the column headers not sortable. If the user clicks a column header, nothing will happen at all. To do this, add the following code to the methods in your detail schema.
methods: { getGridSortMenuItem: Terrasoft.emptyFn, sortColumn: Terrasoft.emptyFn }
Using this method, you’ll still have the column headers visible in the detail list. However, clicking on them won’t do anything. Additionally, the sort action menu will be removed as well.
Subscribe To Our Newsletter
Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!
You have Successfully Subscribed!