-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The ability to remove the 'Hide Column' option in the column menu #1604
Comments
I also would like to turn the menu off, so I'll work on this in the next few weeks. There are three ways to get columns back:
|
To clarify, this issue is not about turning off the column menu, but the ability to remove one or more of the built-in menu items inside the column menu. I still want to use the column menus, but I don't want to give the user the ability to remove a column or remove the sort on a column. |
Just a question @wattsbn : removing the sort on a column means clearing the sort. So you'd like someone to be able to sort ASC or sort DESC, but not to sort NONE? |
…w disableColumnMenu Also allows disabling the hide column menu option. Includes new e2e test for 303 tutorial.
I've provided the ability to hide the column menu entirely, and to remove the hide column option. I haven't removed the sort NONE option as that doesn't make sense to me yet. |
1 similar comment
I've provided the ability to hide the column menu entirely, and to remove the hide column option. I haven't removed the sort NONE option as that doesn't make sense to me yet. |
@PaulL1 Thanks for the quick turnaround on the fixes and enhancements. I would still like the ability to to force a column to always have a sort. In one of my grids there is only one sortable column and if it is unsorted, then the data is displayed in a seemingly random way. I don't see how it is useful to the user in that case. After using your changes that you recently merged in. There are still two bugs involving the column menu that have not yet been resolved. I have replied on #1603 describing them. |
Ah, OK, understand where you're going with that. Probably be Tuesday before I get to that now. |
…i#1603 angular-ui#1604 Also fixes issue where column menu still displayed with a long press even where column menu was disabled for that column.
I'm just learning Angular & UI grid, a follow-up question, can the angle-down icon be completely disabled or hidden so users can't do any sorting, etc. Thanks. |
If you disable sorting on the grid - refer the gridOptions in the api documentation: http://ui-grid.info/docs/#/api/ui.grid.class:GridOptions |
As it took me some time to figure it out and most of my google searches turned up this page: The column hiding can be disabled by setting
|
thanks @j2L4e |
Would you please add this option: "enableHiding = false" on grid level, not only columnDef level? |
Hi, just checking also on the ability to re-add a hidden column without refreshing the page? |
Hi mmilito |
A grid-level option for this would make a lot of sense. |
This would be great to have, so reposting as I need as well: |
enableHiding = false is not working for me.. tested in column and grid level..
I had to fix this manually:
|
Tested using |
Hi guys.
Next, include UIGridOverrideService to your controller. And use it in the grid. For example:
You can also use the same way to add custom sorting or something else. |
I'm still seeing this as an issue with 4.4.9. I've tried the following grid-level (GridOptions) solutions, per documentation, to hide the "X Hide Column" dropdown on a column:
The following solutions work as column-level (GridOptions.columnDef) options:
|
Setting enableHiding to false in gridOptions will remove the ability to hide columns by default on all columns, unless explicitly enabled in the column definition. Closes: #1604
Setting enableHiding to false in gridOptions will remove the ability to hide columns by default on all columns, unless explicitly enabled in the column definition. Closes: #1604
As the title suggests, I would like the ability to remove the 'Hide Column' option from the column drop down menu. I really want to turn it off for all my columns, but I would imagine being able to turn it off per column would be more flexible for other people. The docs provide an example of how to add more options to the menu, but not a way to remove the built-in ones. Since there doesn't seem to be a built-in way to add the columns back, I don't really want to give the users a way to remove them. I would also like the ability to remove the 'Remove Sort' menu item. One of my grids only has one sortable column and it doesn't really make sense to be able to remove the sort direction in that case.
I think the best solution would be to allow us to override the built-in menu items in the column menu both globally and for individual columns. This would let us remove menu items that we don't want (like 'Hide Item'), provide icons that match our applications theme, or allow for us to use different localization implementations. However, this is also probably the most work, and I really only need the ability to remove specific menu items for now.
The text was updated successfully, but these errors were encountered: