Need a special offer?Find out if your project fits.
+

How to hide right clic menu on rows

Answered
Patrick TAVARIS asked on December 11, 2019

Hi,
I'm trying to hide right click on rows (see attached image).
I've put showHeaders and showFilters to "false" (under grid option) but the right click on a column let me filter anyway. I think I'm missing an option doesn't it ?
 
It seems I have to use : https://www.flexmonster.com/api/customizecontextmenu/
But I can't see an example with the "default" full options filled (to let me start with it and customize only options I don't want to see)
 

7 answers

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster December 11, 2019

Hello, Patrick,
 
Thank you for reporting about the inconsistent behavior of the showFilters property. We would like to announce that the property set to `false` will also hide the filter controls placed in the context menu with the minor update ETA 13.01.20.
 
For now, as a workaround, we would like to suggest using the following workaround: hide appropriate tabs of the menu using the customizeContextMenu method. Our team has prepared the function satisfying your needs:

flexmonster.customizeContextMenu(function(items, data, viewType) {  
if (data.type == "header" && !data.isGrandTotal) {    
if (data.member != null)      items.splice(3, 1);    
else items.splice(0, 1);  
}  
return items;
});

 
The function allows hiding filter control tabs inside the context menu whether or not the showFilters is set to false or not.
 
Also, check out an example demonstrating the result of the function above.
 
We hope it helps.
 
Please, contact us in case additional questions occur.
 
Kind Regards,
Illia

Public
Patrick TAVARIS December 11, 2019

Thanks for the reply. I would highly suggest to add options like "showFilters" to "showXX" :

  • agregation
  • see through (in french "percer dans")
  • and other "customization" options available in the context menu

As the index items are not in an hashmap such as "filterOption" => ..., and that this index change depending on type or use case, it is quite unnecessarily complicated to manage all the use cases.
If there was additional "showXX" options, that also work for contextMenu AND toolbar, it could be great...
 
I hope it could help
 
Regards
 
L.
 

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster December 13, 2019

Hello, Patrick,
 
Thank you for your feedback.
 
Our team would like to kindly recommend checking out drillThrough and showAggregations properties of the options object. Named properties allow removing dedicated UI controllers both from the Toolbar and from the context menu.
 
More information about options object and its properties can be found by the following link: https://www.flexmonster.com/api/options-object/.
 
Other elements of the context menu can be manually hidden in the menu itself and from the Toolbar in case they are doubled in it.
 
For example, controllers dedicated to formatting can be removed from the context menu using customizeContextMenu API call and from the Toolbar using the beforetoolbarcreated event.
 
Please check out the following tutorials, which can turn out useful for you: customize context menucustomize the Toolbarbeforetoolbarcreated event.
 
We hope it works for you.
 
Best regards,
Illia

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster January 14, 2020

Hello, Patrick,
 
We are glad to inform you that the issue when grid.showFilter option does not disable filtering options in the context menu was fixed.
 
This is provided in the 2.7.23 version of Flexmonster: https://www.flexmonster.com/release-notes/
 
You are welcome to update the component. Here is our updating to the latest version tutorial for guidance: https://www.flexmonster.com/doc/updating-to-the-latest-version/ 
 
Please let us know if everything works.
 
Best regards,
Illia

Public
Serban Vasile March 4, 2020

These is still an issue with showFilter: false
If the pivot is in Flat form, the filter gear icons on the column headers are STILL showing. Nothing happens when you click on them, but they are still there. Can you guys hide them, please?

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster March 4, 2020

Hello, Serban,
 
Thank you for reporting about the problem.
The fix is going to be provided with a minor update ETA Mar 23.
 
We will keep you posted with any updates on this point.
 
Do not hesitate to contact us in case of additional questions.
 
Kind regards,
Illia

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster March 24, 2020

Hello, Serban,
 
We are pleased to inform you that gear icon is now hidden in the flat form with grid.showFilter: false option.
 
This is available in the 2.8.3 version of Flexmonster: https://www.flexmonster.com/release-notes/
 
You are welcome to update the component.
Here is our updating to the latest version guide for assistance: https://www.flexmonster.com/doc/updating-to-the-latest-version/ 
 
Please let us know if everything works.
 
Best regards,
Illia

Please login or Register to Submit Answer