2

I have a grid that has an external "Show Details" option which would add more columns to the grid.

Grid with an external show details button showing export menu

The issue is the "Export all data" vs "Export visible data" which becomes deceiving at this point.

I understand that visible data is what data gets loaded, but in this case, all the data gets loaded at once. Therefore, users would think that "visible data" would be what they are seeing and "all data" would also include the columns that gets added when "show details" is clicked which unfortunately is not the case.

Is it possible to customize the grid menu? Or at least hide the "Export visible data" options?

Please help! Thank you.

Reference: http://ui-grid.info/docs/#/api/ui.grid.exporter.api:GridOptions

1 Answer 1

5

Good morning

I had the same problem in my project and i used following configuration in the options:

You can hide the ui-grid menu-entries for exporting by using exporterMenuPdf: false, exporterMenuCsv: false,

To add some custom menu-entries, you can use gridMenuCustomItems: [ { icon: 'fa fa-print', title: 'Text of the menu-item', action: function ($event) { self.someFunction(); }, order: 100 } ],

Hope it helps...

Greets Christian

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks. It helps a lot. Here is my plnkr: plnkr.co/edit/OMTCvaNbjHKVjNBQrXno?p=preview
It is working perfectly in the plnkr. When i download and refer to a local json file, to just make in my computer alone i.e standalone version i.e without internet it says cross domain issue. Can someone help me on how to make it work in a local system or folder - i will place the html, json, css and javascript in the same folder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.