open.window javascript function not working within GridView

C

coosa

Dear all,
I tried to replace the GridView Column's HyperLinkField
"DataNavigateUrlFormatString" property with a java script pop up
window, but wehen i preview the page, the link is REMOVED! Does any one
see any thing wrong in the code below?

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataKeyNames="ITEM_ID"
DataSourceID="SqlDataSource1">
<Columns>
<asp:BoundField DataField="ITEM_ID" HeaderText="Item
ID" ReadOnly="True"
Visible="False" />
<asp:HyperLinkField
DataNavigateUrlFields="ITEM_ID,ITEM_MODEL,ITEM_MANUFACTURER"
DataTextField="ITEM_MODEL"
HeaderText="Model"
DataNavigateUrlFormatString="javascript:var
w=window.open('../ItemsDetails.aspx?ITEM_ID={0}&ITEM_MODEL={1}&ITEM_MANUFACTURE={2}',null,'width=600,height=400');"
/>
<asp:BoundField DataField="ITEM_MANUFACTURER"
HeaderText="ITEM_MANUFACTURER"
SortExpression="ITEM_MANUFACTURER" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:MyDBConnectionString
%>"
ProviderName="<%$
ConnectionStrings:MyDBConnectionString.providerName %>"
SelectCommand="SELECT [ITEM_ID], [ITEM_MODEL],
[ITEM_MANUFACTURER] FROM [ITEM]">
</asp:SqlDataSource>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top