Treetable order retain

His there a way of retaining row order in the database after Drag'nDrop?
Movements inside branch lost after page refresh.

Best regards

Comments

  • Hello @maumad,

    His there a way of retaining row order in the database after Drag'nDrop?

    It is possible to do it through the trackMove property. This property helps catching the moment data was reordered in the component and sends the necessary info to server.

    view:"treetable",
    save:{
         url: url,
         trackMove:true
    }
    

    The save property implicitly defines a Dataprocessor while the above notation allows configuring it. By default trackMove is switched off. So serverside code should be tuned in order that state is really changed.

  • Hi @annazankevich ,
    Thank you for your time.

    I've implemented the order webix_operation turning trackMove on and altered my serverside code to deal with the webix_move_index, webix_move_id, webix_move_parent parameters.

    But I might be missing the actual concept of order webix_operation.

    I've added a field to the database to record the branch index and order the treetable according to that. That should do the trick, but on DnD after de order operation I'm getting an update operation that's reverting the branch index field to the previous value.

    Best regards

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!