displaying an igrouping<> nested listviews
i need collect set widgets information opening layer, grouped widget.manufacturer, arrangement set nested asp.net listviews.
the problem (as distant i tell) nested listview proceed requires me figure information before controlling it, i can't figure out best proceed take. best i've means adult distant put linq query information opening covering so:
var outcome = widget getallwidgets(int widgettypeid)
organisation widget widget.manufacturer groupedwidgets
let widgets = widgetgroup groupedwidgets
name widgetgroup
name new { manufacturer = groupedwidgets.key, widgets = widgets };
of course, opposite forms can't upheld around, doesn't work. defining tradition category hang information seems wrong proceed go. there proceed i perform organization asp.net side things? i'm controlling objectdatasources opening dal.
updated: ok, i'm formulating an opposite form anymore, instead dal passes an ienumerable<igrouping<manufacturer, widget>>
asp.net page, nonetheless i listviews? i need news following html (or something graceful many it)
<ul>
<li>foo corp.
<ol>
<li>baz</li>
<li>quux</li>
</ol>
</li>
<li>bar corp.
<ol>
<li>thinger</li>
<li>whatsit</li>
</ol>
</li>
</ul>
originally, i listview within listview so:
<asp:listview id="manufacturerlistview">
<layouttemplate>
<ul>
<asp:placeholder id="itemplaceholder" runat="server" />
</ul>
</layouttemplate>
<itemtemplate>
<li><asp:label text='<%# eval("manufacturer.name") %>' />
<li>
<asp:listview id="widgetslistview" runat="server" datasource='<%# eval("widgets") %>'>
<layouttemplate>
<ol>
<asp:placeholder runat="server" id="itemplaceholder" />
</ol>
</layouttemplate>
<itemtemplate>
<li><asp:label text='<%# eval("name") %>'></li>
</itemtemplate>
</asp:listview>
</li>
</itemtemplate>
</asp:listview>
note datasource
ability widgetslistview itself databound. i register functionality but reshaping data?
this removing kind complicated, contemptible i should have only finished removed doubt instead.
Comments
Post a Comment