Change the fixedColumnsLeft dynamically

Tags: #<Tag:0x00007f8b1cc2d338> #<Tag:0x00007f8b1cc2d1f8>

Is there any option to let the user choose how many columns to the left can be frozen (fixed) after loading the data into HoT? something like the excel?
If sometimes he wants to freeze the 1st or the 3rd column ? or he has to decide it before loading the table ?

Hi @dante.soto

We have

  • manualColumnFreeze - which allows users to freeze a certain column
  • fixedColumnsLeft - the option that a developer sets that freezes a certain number of columns on the left

Now, how would you like the user to decide which and how many columns should be fixed? Do you plan to have 0 fixed columns and then allow users to use menus context/dropdown to fix what they want or you plan to have some controls to do that (like for example checkboxes/buttons below the table)?

Hi Aleksandra,
Initially I was thinking to have a simple dropdown (with column index), and a button to trigger the fixed column to the HoT.
But It would be enriching to know the second option you are proposing also, please teach me!

Thank you very much!

Here https://jsfiddle.net/gr70a8dt/1/ I have an interesting example where we can fix selected columns without using the manualColumnMove functionality (cause you may not want users to move the columns). It uses variables to define

  • column headers
  • columns option
  • fixedColumnsLeft number

Now when the user clicks the Fix selected column button we run the mechanism of array element switch for the array of column labels and columns indexes of data and run the updateSettings() method to apply the changes.