|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Resolving datasource expressionI 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 Hi Madar,
Thanks for your posting. Regarding on this issue, I've also seen your another duplicated thread in this newsgroup. I've posted my reply there. If you feel it convenient that we continue to discuss in that one, please feel free to post there. Thanks, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) -------------------- Show quoteHide quote | Thread-Topic: Resolving datasource expression microsoft.public.dotnet.framework.aspnet.webcontrols:9987| thread-index: AcWMc8y2jzn5fAOyTSSEI//EvG3dqA== | X-WBNR-Posting-Host: 194.212.229.226 | From: =?Utf-8?B?TS5ELk0u?= <madar@community.nospam> | Subject: Resolving datasource expression | Date: Tue, 19 Jul 2005 08:09:03 -0700 | Lines: 28 | Message-ID: <7372A7B5-3DE1-4DFE-AF19-0E1C8BB45***@microsoft.com> | MIME-Version: 1.0 | Content-Type: text/plain; | charset="Utf-8" | Content-Transfer-Encoding: 7bit | X-Newsreader: Microsoft CDO for Windows 2000 | Content-Class: urn:content-classes:message | Importance: normal | Priority: normal | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0 | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250 | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl | Xref: TK2MSFTNGXA01.phx.gbl Show quoteHide quote | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols | | 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 |
Other interesting topics
Render TreeViewControls in .net 2003
Resolving datasource expression Working with Mac Safari Browser How do I find out the page name in ASP composite control does not fire event return parameter Using OpenFileDialog WebControl.Style and ViewState Re: CustomValidator control BUG How do I get a custom Control Designer to write to the HTML of my control? |
|||||||||||||||||||||||