J
jmhmaine
My Code:
HTML for Panel 1
<aspataList ID="dlItems" Runat=server DataKeyField="Prod_PK" >
<ItemTemplate>
<table class="ItemTable" cellSpacing="0" cellPadding="1" width="400"
border="0">
<tr>
<td width="300" class="ProdName">
<%# Container.DataItem("Prod_Name") %></td>
<td width="100" class="ProdQty">Qty</td>
</tr>
<tr>
<td width="300"><%# Container.DataItem("Prod_Description") %>
Cost: $<%# Container.DataItem("Prod_Price") %></td>
<td width="100" valign="top" align="center">
<asp:TextBox id="txtProdQty" CssClass="txtProdQty" Runat=server
/></td>
</tr>
<tr>
<td colspan="2"><hr id="ProdHR" /></td>
</tr>
</table>
</ItemTemplate>
</aspataList>
Question:
For Panel 2 I want to loop through the DataList, and create a DataGrid using
the DataKey and the Quantity Value and bind the DataGrid. In this case I know
how to build the DataGrid, I just need the syntax to loop through the
DataList from Panel1
HTML for Panel 1
<aspataList ID="dlItems" Runat=server DataKeyField="Prod_PK" >
<ItemTemplate>
<table class="ItemTable" cellSpacing="0" cellPadding="1" width="400"
border="0">
<tr>
<td width="300" class="ProdName">
<%# Container.DataItem("Prod_Name") %></td>
<td width="100" class="ProdQty">Qty</td>
</tr>
<tr>
<td width="300"><%# Container.DataItem("Prod_Description") %>
Cost: $<%# Container.DataItem("Prod_Price") %></td>
<td width="100" valign="top" align="center">
<asp:TextBox id="txtProdQty" CssClass="txtProdQty" Runat=server
/></td>
</tr>
<tr>
<td colspan="2"><hr id="ProdHR" /></td>
</tr>
</table>
</ItemTemplate>
</aspataList>
Question:
For Panel 2 I want to loop through the DataList, and create a DataGrid using
the DataKey and the Quantity Value and bind the DataGrid. In this case I know
how to build the DataGrid, I just need the syntax to loop through the
DataList from Panel1