I am using AG-Grid to display the data inside the table. We are using the TreeData option to display the data. We have a context menu where there are two options: Expand All, Collapse All. I need to disable these two options in case the Grid doesn't have any grouped row. I searched a lot through the AG-Grid API/Documentation and I didn't find such a method which can tell me if the Tree contains groups or not.
Somebody knows how can I retrieve this kind of information form AG-Grid?
Here is how it looks the context Menu:
Here is how it looks a not grouped table: