ISPrincess
Programmer
I have imbedded a datalist control in my Datagrid.
This datalist is made up of Linkbuttons. HTML Below. (sorry about the formatting)
On the ItemCommand of the imbedded list, the code will need to perform some procedure. This procedure needs to know the datakey of the parent control: the datagrid. The item is not selected in the datagrid.
Any ideas on how to capture the datakey of the parent datagrid in the itemcommand of the imbedded datalist?
PH
I was walking home one night and a guy hammering on a roof called me a paranoid little weirdo.
In morse code.
-Emo Phillips
This datalist is made up of Linkbuttons. HTML Below. (sorry about the formatting)
Code:
<asp:templatecolumn headertext="From Facility">
<ItemTemplate>
<asp:datalist id="dlFacilities" Runat="server" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" CellPadding="4" ShowHeader="False" RepeatDirection="Horizontal" BackColor="White" DataKeyField="FacilityCodeID" OnItemCommand="dlFacilities_ItemCommand" OnItemDataBound="dlFacilities_ItemDataBound">
<ItemStyle Wrap="False" />
<ItemTemplate>
<asp:linkbutton id="lnkFacility" runat="server" commandname="Submit" commandargument='<%# DataBinder.Eval(Container, "DataItem.FacilityCodeID")%>'>
<%# DataBinder.Eval(Container, "DataItem.Name")%>
</asp:linkbutton>
</ItemTemplate>
</asp:datalist>
</ItemTemplate>
</asp:templatecolumn>
On the ItemCommand of the imbedded list, the code will need to perform some procedure. This procedure needs to know the datakey of the parent control: the datagrid. The item is not selected in the datagrid.
Any ideas on how to capture the datakey of the parent datagrid in the itemcommand of the imbedded datalist?
PH
I was walking home one night and a guy hammering on a roof called me a paranoid little weirdo.
In morse code.
-Emo Phillips