Issue Datatable header Columns

edited December 2016 in Technical questions

I found this issue on Datatables

  • 1) Load the datatable
  • 2) Click a custom save button and save in database the State of Datatable so that I can have different views/states of my datatable.
  • 3) Resize one column from Datatable
  • 4) From a selectpicker where I load the saved views/states select one and then use setState to load the saved state.
  • 5) The header columns are gone


  • Can you please provide a demo where the mentioned behavior can be tested?

  • Hi,

    found my code problem and would like to mention it here for feedback

    I save different states of one datatable in database using getState and then save it in database as

    $record["state"] = (string) json_encode($state);

    but saving it as JSON then my widths in state are strings


    So when I try to load one of the datatable saved states in database then the webix try to make
    additions of the widths but they are strings so I have concatenations than math addition.

    This destroy the CCS left property on the columns like this

      <div column="4" class="webix_column " style="width: 180px; 
       left: 360220px; top: 0px;">

    So as solution you can save the JSON state in database using the flag

      $record["state"] = (string) json_encode($state, 
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!