Is it possible to change the order using drag and drop?

Hi all,
I’m new of this wonderful software… it is really simple to use and very well done…

I have only an issue, and it is related to the possibility to change the order of items using drag and drop. I didn’t find any information related to this… is it possible to implement? the php connector, as far as I see doesn’t handle the “order” field like it does with the parent one…

Thanks a lot,
Marcello

Hi,

connector doesn’t process items order. The item index is passed by the “tr_order” parameter. Therefore, you may define beforeUpdate event and execute “update” execute query as you need:

//fully custom code
function my_update($data){
$index=$data->get_value(“tr_order”);

}
$conn->event->attach(“beforeUpdate”,“my_update”);

Here are the details docs.dhtmlx.com/doku.php?id=dhtm … ex_updates

Hi!
thanks a lot! implmented the beforeUpdate statement but I noticed that $data in my_update($data) is related only to the item that is changing, isn’t it?

I think that I can’t update (in mysql) the proper order of all the items only with this information: I think I need to know the position of all the items; can you tell me where to find some info?

Thank you very much!
Marcello

Hi,

yes, the connector receives information only about updated item. You should make additional sql queries in order to get information about other items.