M
M.D.M.
Hi,
I have templated databound custom control similar to repeater.
<Display:Tree id="DB" runat="server">
<Root><%# DataBinder.Eval(Container.DataItem,"Node") %><br></Root>
<Leaves><%# DataBinder.Eval(Container.DataItem,"Subnode") %>, </Leaves>
</Display:Tree>
I need display only one Node and all its subnodes then line break etc. E.g.
Node1
Subnnode11, Subnode12, ... Subnode1N
Node2
Subnnode21, Subnode22, ... Subnode2N
....
I would like to do it so : in control code I will check whether DataItem
from DataSource is from <Root> element and if yes I will display it only
once. But I do not know how to check whether DataItem is from <Root> or from
<Leaves>.
Or will you suggest me other approach ?
I want to do it so becaause HTML formatting must be on .aspx not in code
(.cs).
Thank you
I have templated databound custom control similar to repeater.
<Display:Tree id="DB" runat="server">
<Root><%# DataBinder.Eval(Container.DataItem,"Node") %><br></Root>
<Leaves><%# DataBinder.Eval(Container.DataItem,"Subnode") %>, </Leaves>
</Display:Tree>
I need display only one Node and all its subnodes then line break etc. E.g.
Node1
Subnnode11, Subnode12, ... Subnode1N
Node2
Subnnode21, Subnode22, ... Subnode2N
....
I would like to do it so : in control code I will check whether DataItem
from DataSource is from <Root> element and if yes I will display it only
once. But I do not know how to check whether DataItem is from <Root> or from
<Leaves>.
Or will you suggest me other approach ?
I want to do it so becaause HTML formatting must be on .aspx not in code
(.cs).
Thank you