1.
If ajax query not send then error occurred in ajax invoking code or previous lines
possible here
searchData = { 'id': _txtdbid, 'filename': _txtdocname, 'doctype': _txtdoctype};
_txtdbid etc. is global variables, accesible from this context?
2.
Browser contains support of JSON object (JSON.stringify) ?
3.
What output in error console?
4.
document.getElementById('grayOut').style.display = "none";
//Same
$('#grayOut').hide();
5.
For bettre performance call selector once
var tree = $('#test');
tree.treegrid('loading');
...
tree.treegrid('loadData', jQuery.parseJSON(data.d));
enableDnd(tree);
tree.treegrid('loaded');