Hello,
What is the best way to hide the multi select menu option available on the tools menu of a Detail grid?
Like
Allen Dsouza,
Please add the following code to the detail schema in order to block the shift key from allowing multi-select:
diff: [
{
"operation": "merge",
"name": "DataGrid",
"values": {
"canChangeMultiSelectWithGridClick": false
}
}
]
Best regards,
Norton
Dear Allen,
In order to do it, please create a replacing client module for the required detail schema and add the following code (In this example I apply the changes to the “AccountAddressDetailV2” schema):
define("AccountAddressDetailV2", [], function(){
return {
methods: {
/*override*/
addGridOperationsMenuItems: function(toolsButtonMenu){
toolsButtonMenu.addItem(this.getButtonMenuSeparator());
const exportToExcelMenuItem = this.getExportToExcelFileMenuItem();
if (exportToExcelMenuItem) {
toolsButtonMenu.addItem(exportToExcelMenuItem);
}
const fileImportMenuItem = this.getDataImportMenuItem();
if (fileImportMenuItem) {
toolsButtonMenu.add("FileImportMenuItem", fileImportMenuItem);
}
Terrasoft.each([
this.getShowQuickFilterButton(),
this.getHideQuickFilterButton(),
this.getGridSortMenuItem(),
this.getGridSettingsMenuItem(),
this.getRecordChangeLogMenuItem(),
this.getObjectChangeLogSettingsMenuItem()
], function(buttonConfig) {
if (buttonConfig) {
toolsButtonMenu.addItem(this.getButtonMenuSeparator());
toolsButtonMenu.addItem(buttonConfig);
}
}, this);
}
}
};
});
Please see the screenshot with the result below:
Best regards,
Norton
Norton Lingard,
Thank you! I tested and realized that the shift key still allows the multi-select option even if the menu is not available. Any idea how to block the shift key from allowing multi-select on the detail grid?
Allen Dsouza,
Please add the following code to the detail schema in order to block the shift key from allowing multi-select:
diff: [
{
"operation": "merge",
"name": "DataGrid",
"values": {
"canChangeMultiSelectWithGridClick": false
}
}
]
Best regards,
Norton