I changed your column resizing sample to have the widths of columns defined in percentages. When i try to drag the last column to the left, i notice that the column does not extend to the end of the grid.
http://jsfiddle.net/9js6z61g/
Hello Robert,
Please let me know if you need any further assistance with this matter.
What I can suggest as a workaround for achieving your requirement is handling columnResized event. In this event there is an internal method that you could call in order to calculate the new column widths which will take autofitLastColumn property under consideration. For example:
features: [ { name: "Resizing", columnResized: function (evt, ui) { ui.owner.grid._rerenderColgroups(); } }, { name:"Hiding" } ]
I am attaching a small sample illustrating my suggestion for your reference.
Please try this approach in your application and let me know whether it helps you achieve your requirement.
This is not exactly a solution. I am already aware of what you stated. I have a set of requirements that i need to fulfill which i explained and while doing that i do not want to see empty space on the grid when i resize the last column. How do i accomplish this?
Thank you for your clarifications.
In this described scenario this is the expected behavior for igGrid. Initially all columns are rendered with their respective widths (set in pixels). In case that you try to decrease the size of any of the existing columns total width of the columns is smaller than the grid width. This is the reason why an empty space appears at the end of the grid.
Please let me know if you have additional questions regarding this matter.
Okay quick recap of everything ive mentioned before -
We have a grid with 15+ columns. Some are hidden by default. We would like every column to have a particular width and we would like to see the content of every column in its entirety when all of them are shown. For the purpose of presentation all column content properly with the intended width, when all columns are shown a scrollbar is needed to horizontally scroll across the list of all our columns. This works at the moment. But when the user tries to resize the last column in the grid we see a blank space to the right of that column which is really not acceptable. Setting the column width of the last column in percentages make sense if you have set of fixed columns without the ability to show and hide them but in our case it will not. Does this clarify our issue?