日期:2014-05-17 浏览次数:20491 次
<div align ="center" id="DivGridview">
<asp:GridView ID="Grv_Outlay" Width="100%" AutoGenerateColumns="False" DataKeyNames="Serviceid">
<Columns>
<asp:BoundField DataField="RName" HeaderText="序号">
</asp:BoundField>
...
....
</Columns>
<asp:TemplateField HeaderText="操作">
<ItemTemplate>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<asp:CheckBox ID="CheckBox1" onclick="SelectRadio('DivGridview',this)" runat="server" />
</td>
</tr>
</table>
</ItemTemplate>
</asp:GridView>
</div>
<asp:Button ID="btn_XZ" CssClass="button" runat="server" Text="选择" />
<script language="javascript" type="text/javascript">
//如何获取gridview中的DataKeyNames 值
str=.....
//新窗口
var srcFile = "SelectName.aspx?Bm=" + escape(str) + "";
//高度,位置等
var winFeatures = "dialogHeight:550px; dialogLeft:300px;";
window.showModalDialog(srcFile, winFeatures);
</script>