Node folder vs Node leaf in TreeGrid and RestDataSource

Hi,

I’m using RestDataSource since the request and response formats used by it allows me to display hierachical data trhough a dataBound TreeGrid component.

This is the xml data that comes from the server

<record>
<Id>2</Id>
<Refid>1</Refid>
<Name>ROOT</Name>
</record>
<record>
<Id>3</Id>
<Refid>2</Refid>
<Name>X</Name>
</record>
<record>
<Id>4</Id>
<Refid>2</Refid>
<Name>Y</Name>
</record>
<record>
<Id>5</Id>
<Refid>3</Refid>
<Name>X child</Name>
</record>

My problem is the Y record. Since it don’t have childs it is represented in the TreeGrid as a leaf node and not as a folder.
How can i programatically change this behaviour?

Thanks in advance

All DataSources allow hierarchical data.

See the Tree DataBinding topic for how to configure a DataSource to work with this data. Hint: note the need to set primaryKey and foreignKey.

Thanks for the reply.
I solve my problem by adding a isFolder attribute in my XML response data with the value true.

Cheers

how to add isFolder in datasourse

[QUOTE=MindTheGap;n69569]Thanks for the reply.
how to add isFolder in datasourse