enableAutoSaving does not work after columnDelete

Hi,



enableAutoSaving does not work if it is invoked after deleting a column in the grid. It works fine otherwise.



I am using pro v.2.0



Test Case:

Please use the following script in pro_column_states_save.html. Two delete statements have been included.







Can you please provide me a solution/fix?



Thanks.


enableAutoSaving method save in cookies only column width, hidden state of a column, index of a column if it has been moved, sorting order, open state of the item for the treeGrid. When you are deleting column no one of this actions happen. After deleting a column you can serialize grid to the xml and at the next time load grid from this serialized xml. Please see example here dhtmlx.com/docs/products/dhtmlxG … olumn.html

Hi dhxSupport,

The question is NOT about the delete action per se. If a column is deleted from the grid, enableAutoSaving method does not save subsequent column order after it is moved, in cookies. If the columns are not deleted, subsequent column moves are saved in the cookies.

Sample Steps: Test Case File: pro_column_states_save.html

SUCCESS CASE:

  1. Initialize and load mygrid.
    2) Move “Author” column to index position 4.
    3) Click on “save order” button to save the column order in cookies.

  2. Move “Author” column to index position 6.
    5) Click on “restore order” button.
    Result:
      - “Author” column is moved back to index position 4.
     

    FAILURE CASE:
    1) Initialize and load mygrid.
    2) Delete “Sales” column (index 0).
    3) Move “Author” column to index position 4.

  3. Click on “save order” button to save the column order in cookies.

  4. Move “Author” column to index position 6.

  5. Click on “restore order” button.

    Result:
      - “Author” column is still in index position 6. It does NOT move to index position 4.
     
    Please let me know if you need more clarification on the question.

    Thanks.

Problem confirmed and fixed. Fixed js file sent by email.
( please beware that in situation when column deleted after column moving, it still will not be able to restore previous order )


Hi Support,



Thank you!



But I did not receive the fixed js file. Not sure if there is an email filter put up at my place. Can you please suggest an alternate method for sending the file?



Thanks.

You can contact support@dhtmlx.com directly and they will send you fix