<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<div>
<h2>How to customize the context menu for the flat view</h2>
<p>
The context menu can be customized using the
<a
href="https://www.flexmonster.com/api/customizecontextmenu/"
target="_blank"
>customizeContextMenu()</a
>
method. It has the <code>viewType</code> parameter, which is needed to
customize the context menu for a certain view type.
</p>
<p>
To customize the context menu for the flat view, check if the
<code>viewType</code> is <code>flat</code>. In this example, we have added
the <strong>Switch to charts</strong> option to the flat view's context menu
(lines 41-59 in the JavaScript box).
</p>
<p>
<a
href="https://www.flexmonster.com/doc/customizing-context-menu/"
target="_blank"
>Visit our docs to learn more about customizing the context menu</a
>.
</p>
</div>
<div id="pivot-container"></div>