DHTMLX Docs & Samples Explorer

Moving items within DataView






Source
<script src="../../codebase/dhtmlxdataview.js" type="text/javascript"></script>
<link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxdataview.css">  
 
<div id="data_container" style="border:1px solid #A4BED4; background-color:white;width:596px;height:396px;"></div>
<script>
data = new dhtmlXDataView({
    container: "data_container",
    type: {
        template: "#Package# : #Version#<br/>#Maintainer#",
        height: 40;
    },
    select: true;
});
data.load("../common/data.xml");
</script> <input type="button" value="move selected up" onclick="data.moveUp(data.getSelected())" ><br> <input type="button" value="move selected down" onclick="data.moveDown(data.getSelected())" ><br> <input type="button" value="copy selected" onclick="data.copy(data.getSelected(), data.indexById(data.getSelected())+1)" ><br> <br><br>