P
Pat
All,
What I want to do:
*******************
Click on a hyperlink in the last column in a datagrid, have it grab a
value in the fourth column in the same row and send it to the codehind
into a function that will then put the value into a query and send it
off the database.... and do some stuff with the return.
What I have so far:
********************
I have the first part of the program done, the datagrid is populated
and the last column has the hyperlink.
What code I have:
******************
In the .ASPX
=============
<asp:TemplateColumn>
<ItemTemplate>
<asp:HyperLink id="HyperLink2" Runat="server"></asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
In the code behind - In the Page Load
======================================
if(Page.Request["Report"]!=null)
ShowReport();
In the code behind
====================
private void grdReceipts_ItemDataBound(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if((e.Item.ItemType == ListItemType.Item)|| (e.Item.ItemType ==
ListItemType.AlternatingItem))
{
HyperLink c=(HyperLink)e.Item.FindControl ("HyperLink2");
c.Text="Report" ;
c.NavigateUrl='Javascript:document.getElementById("hidCurrentTab").value
= "Detail"; window.open('ItemAudit.aspx?Report=True', 'Report', '')'
}
}
Any help is appreciated.
Thanks,
Pat G.
What I want to do:
*******************
Click on a hyperlink in the last column in a datagrid, have it grab a
value in the fourth column in the same row and send it to the codehind
into a function that will then put the value into a query and send it
off the database.... and do some stuff with the return.
What I have so far:
********************
I have the first part of the program done, the datagrid is populated
and the last column has the hyperlink.
What code I have:
******************
In the .ASPX
=============
<asp:TemplateColumn>
<ItemTemplate>
<asp:HyperLink id="HyperLink2" Runat="server"></asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
In the code behind - In the Page Load
======================================
if(Page.Request["Report"]!=null)
ShowReport();
In the code behind
====================
private void grdReceipts_ItemDataBound(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if((e.Item.ItemType == ListItemType.Item)|| (e.Item.ItemType ==
ListItemType.AlternatingItem))
{
HyperLink c=(HyperLink)e.Item.FindControl ("HyperLink2");
c.Text="Report" ;
c.NavigateUrl='Javascript:document.getElementById("hidCurrentTab").value
= "Detail"; window.open('ItemAudit.aspx?Report=True', 'Report', '')'
}
}
Any help is appreciated.
Thanks,
Pat G.