1

I have following code which is working fine for not having filters. Also able to set width even if it is a resizable grid. But sort is the only problem. Not able to remove the sort option from Edit column data. sortable: false is not working in my code. I can still the sort icon of arrow present in the row Header.

You can find the same in the screenshot. How to get rid off this?

                        let colDefs = [];
                        let editCol = {
                            name: 'test',
                            displayName: 'Edit',
                            cellTemplate: '<span class="glyphicons glyphicon-pencil edit-app-host"></span>',
                            width: '75',
                            enableFiltering: false,
                            sortable: false,
                            enableColumnMenu: false
                        };

enter image description here

Mithun Shreevatsa
  • 3,588
  • 9
  • 50
  • 95

2 Answers2

1

You should use enableSorting: false on the column you don't want to be sortable and use enableColumnMenu: false on a column if you want to hide the menu arrow. Example PLUNKER: http://plnkr.co/edit/0FE4JSzVxPjduYQTA3ts?p=preview

DGarvanski
  • 2,555
  • 3
  • 26
  • 35
  • Thanks for your comment, but still i can see the arrow icon – Mithun Shreevatsa Feb 22 '17 at 16:11
  • Then you'll probably need to provide some more code, since the problem with your column config is that you're using `sortable: false` – DGarvanski Feb 22 '17 at 16:18
  • set your initial colDef enableSorting: false and then set true for each individual columns if needed. But @DGarvanski code works, it's how I build my UI-grids. I have had issues before where the grid acted funky from time to time. – McMintz Feb 22 '17 at 17:03
0

Arrow was hidden with the help of css:

span i.ui-grid-icon-up-dir:first-child{
  display:none;
}
Mithun Shreevatsa
  • 3,588
  • 9
  • 50
  • 95