ackerchez
03-12-2009, 10:57 AM
Hi Everyone, I need some help with a tree control.
Here is the issue:
I have a serverside httpservice call and return with php, php returns an xmllist that looks like this:
<root>
<sectioncode>
1
<labtitle>
Biological Materials
</labtitle>
</sectioncode>
<sectioncode>
2
<labtitle>
Chemical Materials
</labtitle>
</sectioncode>
</root>
I would like to bind this result to a tree control so that it displays nicely for all to see but something is going wrong. When I set the dataprovider of the tree to "get_sections.lastResult.sectioncode," the tree forms but the first folder (which I would like to just show the "sectioncode" value) shows:
"<sectioncode>
1
<labtitle>
Biological Materials
</labtitle>
</sectioncode>"
as the folder name, then it shows "1" (which is the value that I want on the folder) as an item within the folder. Beneath that, I am getting the title as a folder within the first folder with the xml formatting and then another object with the title in there (this sounds complicated if you can't see it). I am not sure what I am doing wrong becasue the xml seems to be coming back from php correctly. The result I am looking for is as follows:
1
Biological Materials
2
Chemical Materials
I would like the titles to be a child of the "sectioncode" value, so that you would have a folder with the sectioncode (1 and 2) and when you click on the folder, you would see the titles within the folder. Can anyone help here??
Thanks!
Here is the issue:
I have a serverside httpservice call and return with php, php returns an xmllist that looks like this:
<root>
<sectioncode>
1
<labtitle>
Biological Materials
</labtitle>
</sectioncode>
<sectioncode>
2
<labtitle>
Chemical Materials
</labtitle>
</sectioncode>
</root>
I would like to bind this result to a tree control so that it displays nicely for all to see but something is going wrong. When I set the dataprovider of the tree to "get_sections.lastResult.sectioncode," the tree forms but the first folder (which I would like to just show the "sectioncode" value) shows:
"<sectioncode>
1
<labtitle>
Biological Materials
</labtitle>
</sectioncode>"
as the folder name, then it shows "1" (which is the value that I want on the folder) as an item within the folder. Beneath that, I am getting the title as a folder within the first folder with the xml formatting and then another object with the title in there (this sounds complicated if you can't see it). I am not sure what I am doing wrong becasue the xml seems to be coming back from php correctly. The result I am looking for is as follows:
1
Biological Materials
2
Chemical Materials
I would like the titles to be a child of the "sectioncode" value, so that you would have a folder with the sectioncode (1 and 2) and when you click on the folder, you would see the titles within the folder. Can anyone help here??
Thanks!