javascript - How to customize the export grid menu on angular-ui-grid? - Stack Overflow

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

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

The issue is the "Export all data" vs "Export visible data" which bees 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: .grid.exporter.api:GridOptions

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

The issue is the "Export all data" vs "Export visible data" which bees 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

Share Improve this question asked Dec 16, 2015 at 14:25 RedAppleRedApple 2011 gold badge5 silver badges15 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 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

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745350841a4623822.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信