문제

I am just starting to use Dynatree and stuck while updating the node display order to database while DragnDrop nodes to and fro.

I tried to google a bit and could not find any helpful links.

So, it will be greatly appreciated of any one can help or shared some helpful links.

Thanks.

도움이 되었습니까?

해결책

I have solved my problem by storing keys on array and use that array to update database for display order index.

dynatree:
onDrop: function (node, sourceNode, hitMode, ui, draggable) {
{
var resultsToClientNode = [];
sourceNode.move(node, hitMode);
$.map(sourceNode.getParent().getChildren(), function (nodelist) {
    if (nodelist.data.addClass == sourceNode.data.addClass) {
        resultsToClientNode.push(nodelist.data.key);
    }
});
// This array "resultsToClientNode" holds your node on DragDroped order.
// Call ajax to update in database.'
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top