我想在其创建时设置节点类型。这就是我正在尝试的:
static void Main()
{
try
{
svc obj = new svc();
..
//XmlDocument xm = new XmlDocument();
string rsp = obj.getContent(..;
String myEncodedString;
myEncodedString = obj.XmlDecode(rsp);
XNamespace xmlns = XNamespace.Get("http://xxxx.com/xxx/xx");
XDocument doc = XDocument.Parse(myEncodedString);
Console.WriteLine(obj.Return_Message_Data("ReturnCode", myEncodedString));
Console.WriteLine(obj.Return_Message_Data("Message", myEncodedString));
Console.WriteLine(obj.Return_Message_Data("Data", myEncodedString));
Console.ReadLine();
}
catch (Exception e)
{
Console.WriteLine(e);
Console.ReadLine();
}
}
这不会设置类型。我知道$("#tree").jstree("create_node", parentId, {text: "mynode", id: "myid", type: "mytype"}, "last");
存在,但我想知道节点的创建是否可行。
答案 0 :(得分:0)
您没有显示树完整配置,所以请检查以下几点:
types
插件"plugins": [ "types" ]
您应该配置types
,例如像这样:
"types" : {
"tree" : {
"icon" : 'https://www.jstree.com/tree-icon.png'
},
"mytype" : {
"icon" : 'glyphicon glyphicon-leaf'
}
}
请参阅演示JS Fiddle