GridView asp:HyperLinkField DataNavigateUrlFields 弹窗提示窗口的实现方法
jQuery脚本弹窗 前端技术 实现 GridView控件内 操作提示
jQuery代码:
<script src="../Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$(".classid").click(function () {
if (!confirm("是否操作此数据?")) {
return false;
}
else {
return true;
}
});
});
</script>
aspx代码段:
<asp:Panel ID="Panel10" runat="server" Height="380px" CssClass="Panel"
ScrollBars="Both" Width="912px" BorderStyle="Solid">
<asp:GridView ID="GridView1" runat="server"
AllowPaging="True" AutoGenerateColumns="False" BackColor="White"
BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" CellPadding="0" Width="890px"
Height="23px" onpageindexchanging="GridView1_PageIndexChanging"
onselectedindexchanged="GridView1_SelectedIndexChanged"
style="margin-left: 3px; margin-top: 0px;" >
<RowStyle BackColor= "#F7F6F3 " ForeColor= "#333333 " Height= "2px "/>
<FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
<Columns>
<asp:HyperLinkField
DataNavigateUrlFields="ScrewPumpWellID"
DataNavigateUrlFormatString="SWBaseInfoForm.aspx?action=edit&ScrewPumpWellID={0}"
HeaderText="删除" ControlStyle-CssClass="classid" Text="<img border=0 src=../images/Edit.gif />">
<ItemStyle Width="30px" />
</asp:HyperLinkField>
<asp:BoundField DataField="ScrewPumpWellID" HeaderText="列表显示参数" >
<ControlStyle Width="150px" />
</asp:BoundField>
<asp:BoundField DataField="ScrewPumpWellName" HeaderText="列表显示参数" >
<ControlStyle Width="150px" />
</asp:BoundField>
<asp:BoundField DataField="OrgName" HeaderText="列表显示参数" >
<ControlStyle Width="150px" />
</asp:BoundField>
<asp:BoundField DataField="MeasureStationName" HeaderText="列表显示参数" >
<ControlStyle Width="200px" Height = "50px" />
</asp:BoundField>
<asp:BoundField DataField="DTUID" HeaderText="列表显示参数" >
<ControlStyle Width="150px" />
</asp:BoundField>
<asp:BoundField DataField="TCPLinkKey" HeaderText="列表显示参数" >
<ControlStyle Width="150px" />
</asp:BoundField>
<asp:BoundField DataField="TCPLinkTypeName" HeaderText="列表显示参数" >
<ControlStyle Width="150px" />
</asp:BoundField>
<asp:BoundField DataField="AIChannelNo" HeaderText="列表显示参数" >
<ControlStyle Width="150px" />
</asp:BoundField>
<asp:BoundField DataField="SIMNO" HeaderText="列表显示参数" >
<ControlStyle Width="150px" />
</asp:BoundField>
<asp:BoundField DataField="GasOilR" HeaderText="列表显示参数" >
<ControlStyle Width="150px" />
</asp:BoundField>
<asp:BoundField DataField="Water" HeaderText="列表显示参数" >
<ControlStyle Width="150px" />
</asp:BoundField>
<asp:BoundField DataField="SPress" HeaderText="列表显示参数" >
<ControlStyle Width="150px" />
</asp:BoundField>
<asp:BoundField DataField="Viscosity" HeaderText="列表显示参数" >
<ControlStyle Width="150px" />
</asp:BoundField>
<asp:BoundField DataField="DynFluidSurf" HeaderText="列表显示参数" >
<ControlStyle Width="150px" />
</asp:BoundField>
<asp:BoundField DataField="OilDensity" HeaderText="列表显示参数" >
<ControlStyle Width="150px" />
</asp:BoundField>
<asp:BoundField DataField="MidDeep" HeaderText="列表显示参数" >
<ControlStyle Width="150px" />
</asp:BoundField>
<asp:BoundField DataField="TempGrad" HeaderText="列表显示参数" >
<ControlStyle Width="150px" />
</asp:BoundField>
<asp:BoundField DataField="GroundConstTemp" HeaderText="列表显示参数" >
<ControlStyle Width="150px" />
</asp:BoundField>
<asp:BoundField DataField="TransPro" HeaderText="列表显示参数" >
<ControlStyle Width="150px" />
</asp:BoundField>
<%--<asp:BoundField DataField="Duplicate" HeaderText="列表显示参数" >
<ControlStyle Width="150px" />
<HeaderStyle Width="1000px" />
</asp:BoundField>--%>
</Columns>
<RowStyle BackColor="White" ForeColor="#003399" />
<SelectedRowStyle BackColor="#009999" Font-Bold="True"
ForeColor="#CCFF99" />
<PagerStyle BackColor="#99CCCC" ForeColor="#003399"
HorizontalAlign="Left" />
<HeaderStyle BackColor="#E2F3FA" Font-Bold="True"
ForeColor="Black" />
</asp:GridView>
</asp:Panel>
真实项目积累 希望对您能有所帮助