I was having trouble persisting user data on nodes when serializing to JSON. I looked at the serialize function and noticed this in dhtmlXTreeObject.prototype._serializeItemJSON:
if(this._xuserData&&a._userdatalist) { … code that adds user data list to JSON … }
It looks like _xuserData is never defined anywhere, so this condition always fails and the user data is never written. I even did a grep through the whole dhtmlxtree directory and the only place _xuserData shows up is in that function. I just removed the this.xuserData and it seems to work fine. Was _xuserData used in the past, but removed in an update?