Hi Sue,
I think you must add some client script to implement this. For example, you
have such a table to display detail for each row in datagrid:
<TABLE id="Table1" >
<TR>
<TD id="MyItem" > </TD>
<TD id="MyPrice"> </TD>
<TD id="MyTax"> </TD>
</TR>
</TABLE>
To set this table, we can add a client side function to the web form :
<script language="vbscript">
sub setTable(item,price,tax)
Table1.all("MyItem").innerText=item
Table1.all("MyPrice").innerText=price
Table1.all("MyTax").innerText=tax
end sub
</script>
To enable click event in the datagrid:
<asp
ataGrid id="MyDataGrid" runat="server" AutoGenerateColumns="false"
Width="312px" Height="152px">
<Columns>
<asp:TemplateColumn>
<HeaderTemplate>
<b>Item </b>
</HeaderTemplate>
<ItemTemplate>
<label onclick="setTable '<%# DataBinder.Eval(Container.DataItem, "Item")
%>','<%# DataBinder.Eval(Container.DataItem, "price") %>','<%#
DataBinder.Eval(Container.DataItem, "Tax") %>' ">
<%# DataBinder.Eval(Container.DataItem, "Item") %>
</label>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp
ataGrid>
Please notice following line in above code:
<ItemTemplate>
<label onclick="setTable '<%# DataBinder.Eval(Container.DataItem, "Item")
%>','<%# DataBinder.Eval(Container.DataItem, "price") %>','<%#
DataBinder.Eval(Container.DataItem, "Tax") %>' ">
<%# DataBinder.Eval(Container.DataItem, "Item") %>
</label>
</ItemTemplate>
I user a label control to display "Item" from datasource. And , add a call
to SetTable in its click event.
Hope this help,
Luke
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)