I have a TreeGrid and DataView in my page, the DataView has images elements
Operations between TreeGrid and DataView
1.- Drag and drop elements from DataView to TreeGrid, this Ok
2.- Drag and drop elements from TreeGrid to DataView, this OK
download/file.php?mode=view&id=10222
3.- I sometimes need clean the TreeGrid and DataView, for those i use function clearAll() for TreeGrid and DataView
4.- Populate DataView again with images elements
5.- Drag and drop elements from DataView to TreeGrid, this Ok
6.- When i Drag and drop elements from TreeGrid to DataView, the row on TreeGrid not delete and it show underline, and the element was moved to the dataView.
download/file.php?mode=view&id=10223
This my code
DataView
imgDataView = new dhtmlXDataView({
container: "gridview",
type: {
template: "#message#<br/><span><img src='" + url + "?UID_KEY=#pathM#'/></span><br/>#indice#",
template_loading: "Loading...",
width: 120,
height: 175,
margin: 0,
padding: 0
},
drag: true,
select: "multiselect"
});
imgDataView.attachEvent("onBeforeDrop", function (context,ev){
if(context.from === docTreeGrid){
if(docTreeGrid.deleteRow(context.source)){
this.add({
indice:ind[1],
message:"...",
pathF:pF,
pathM:pM,
angulo:val6,
expdts:val13,
idImg:idI
}, this.indexById(context.target||this.first()));
return false;
}else{
return false;
}
}
return true;
});