Hello
I have this code::
<script type="text/javascript">
var data = [{... some data}]
function loadData(){
$('#aa').treegrid('loadData',data);
}
</script>
<!-- Load data button -->
<a href="#" onclick="loadData();" class="easyui-linkbutton" >Load</a>
<table id="aa" title="Folder Browser" class="easyui-treegrid" style="width:400px;height:400px"
data-options="
animate: true,
idField: 'id',
treeField: 'name',
onBeforeLoad: function(row,data){
$(this).treegrid('enableDnd', row?row.id:null);
}
">
<thead>
<tr>
<th data-options="field:'name'" width="80%">Name</th>
<th data-options="field:'size'" width="10%" align="right">Size</th>
<th data-options="field:'date'" width="10%">Modified Date</th>
</tr>
</thead>
</table>
when I click on "Load" button, data is loaded, but Drag/Drop does not work.
When I use onLoadSuccess instead of onBeforeLoad, it works but then I can not drop on empty treegrid.
Any solution for this - to be able to drop on empty treegrid and to use enableDnd ?
Thank you