0

I have a slickgrid with few columns in it. I can not manipulate(increase or decrease) the width of any column by dragging it through resizer icon provided by grid itself at the end of every column. The icon shows up when we take cursor to the end of column header but when try to drag it left or right, it doesn't manipulate column width.

This is how my column definition looks like:

{ id: 'record_type', field: 'record_type', name: 'Record Type', toolTip: 'Record Type', sortable: true, filterable: true, minWidth: 150 }

Am I missing something or is there any specific flag I need to provide in my grid options to make it work? How can I achieve this functionality?

Anant Shekhar
  • 101
  • 1
  • 5
  • since you've added a `minWidth`, you will for sure not be able to decrease more than 150, same logic applies when `maxWidth` is filled. Can't help you more than that without a way to replicate, the lib is working as expected in the demo – ghiscoding Aug 31 '21 at 17:29
  • @ghiscoding, Thank you for your reply but I'm not providing any maxWidth property in my definition. So, shouldn't it at least increase the width if not decrease? Right now, it's not even increasing the width. – Anant Shekhar Sep 01 '21 at 08:16
  • like I said earlier, you're not providing anything (code, error, ...) that can help finding your problem. I think SlickGrid uses `jquery.event.drag` (or jQueryUI) for the column resize, it possible (but rare) that one of your external package conflicts with it but it's quite rare. Again I can't help more than that since you didn't provide anything to troubleshoot – ghiscoding Sep 01 '21 at 14:52
  • Okay, so I tried removing `minWidth` property and it works fine now. Don't know how but it works. Now, I'm giving `width` property since I still have to maintain particular width for each column but the thing is `width` doesn't work. Even though I'm providing different widths to diff columns but it is equally assigning width to all. Any thoughts on this? Thanks. – Anant Shekhar Sep 03 '21 at 16:11
  • The `width` doesn't always work in Angular-Slickgrid because the default is to call the SlickGrid `autosizeColumns` on the initial page load (only once) which will try to resize columns with available space and `width` doesn't have much effect in that method, you can disable it via `autoFitColumnsOnFirstLoad` but typically it's not too good without it. I suggest to instead look at the resize by content, see this [Example 31](https://ghiscoding.github.io/Angular-Slickgrid/#/resize-by-content) which always use `width` when provided – ghiscoding Sep 03 '21 at 17:56

0 Answers0