TPetersonFlorida
Programmer
Here's the situation:
I have a datagrid with the first column being a hyperlinkcolumn. I want to put some client-side scripting on this column, specifically a OnMouseOver event. Here is the code for the datagrid:
<form id="editDataGrid" runat="server">
<ASP
ATAGRID id="MyDataGrid" runat="server" PageSize="20" AllowPaging="True" HorizontalAlign="Center" CellPadding="3" HeaderStyle-BackColor="#ff0000" HeaderStyle-Font-Name="arial" HeaderStyle-Font-Bold="True" HeaderStyle-Font-Size="11" HeaderStyle-ForeColor="#ffffff" AlternatingItemStyle-BackColor="#ffffcc" ItemStyle-Font-Name="arial" ItemStyle-Font-Size="10" OnPageIndexChanged="MyDataGrid_Paged" OnItemDataBound="MyDataGrid_ItemDataBound" AutoGenerateColumns="False" BorderColor="Black" BackColor="White" Width="800px">
<FooterStyle BackColor="RoyalBlue"></FooterStyle>
<HeaderStyle Font-Size="X-Small" Font-Names="arial" Font-Bold="True" ForeColor="White" BackColor="RoyalBlue"></HeaderStyle>
<PagerStyle Font-Size="Small" Font-Bold="True" BorderStyle="Dotted" HorizontalAlign="Right" ForeColor="Black" BackColor="RoyalBlue" Mode="NumericPages"></PagerStyle>
<AlternatingItemStyle BackColor="AliceBlue"></AlternatingItemStyle>
<ItemStyle Font-Size="XX-Small" Font-Names="arial" BackColor="Lavender"></ItemStyle>
<Columns>
<asp:HyperLinkColumn ItemStyle-Width="30px" Text="Details" DataNavigateUrlField="MPNID" DataNavigateUrlFormatString="javascript:var w=window.open('webform1.aspx?RecID={0}','_Dwg','width=750,height=450,left=100,top=100,toolbar=No, location=no, directories=no,status=no, menubar=no, scrollbars=no,resizable=no');" NavigateUrl="webform1.aspx"></asp:HyperLinkColumn>
<asp:BoundColumn Visible="False" DataField="MPNID" HeaderText="MPNID">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:BoundColumn>
.
.
.
I thought this could be accomplished using the ItemDataBound event but can't seem to figure out how to get a reference to that column in the grid.
Thanks in advance!
I have a datagrid with the first column being a hyperlinkcolumn. I want to put some client-side scripting on this column, specifically a OnMouseOver event. Here is the code for the datagrid:
<form id="editDataGrid" runat="server">
<ASP
<FooterStyle BackColor="RoyalBlue"></FooterStyle>
<HeaderStyle Font-Size="X-Small" Font-Names="arial" Font-Bold="True" ForeColor="White" BackColor="RoyalBlue"></HeaderStyle>
<PagerStyle Font-Size="Small" Font-Bold="True" BorderStyle="Dotted" HorizontalAlign="Right" ForeColor="Black" BackColor="RoyalBlue" Mode="NumericPages"></PagerStyle>
<AlternatingItemStyle BackColor="AliceBlue"></AlternatingItemStyle>
<ItemStyle Font-Size="XX-Small" Font-Names="arial" BackColor="Lavender"></ItemStyle>
<Columns>
<asp:HyperLinkColumn ItemStyle-Width="30px" Text="Details" DataNavigateUrlField="MPNID" DataNavigateUrlFormatString="javascript:var w=window.open('webform1.aspx?RecID={0}','_Dwg','width=750,height=450,left=100,top=100,toolbar=No, location=no, directories=no,status=no, menubar=no, scrollbars=no,resizable=no');" NavigateUrl="webform1.aspx"></asp:HyperLinkColumn>
<asp:BoundColumn Visible="False" DataField="MPNID" HeaderText="MPNID">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:BoundColumn>
.
.
.
I thought this could be accomplished using the ItemDataBound event but can't seem to figure out how to get a reference to that column in the grid.
Thanks in advance!