日期:2014-05-17  浏览次数:20459 次

高分!在线等!
用showModalDialog打开的模式窗口里有一个GRIDVIEW和一个确定按钮,GRIDVIEW里的CHECKBOX选上后点击确定,将GRIDVIEW里的cell[1]、cell[3]放到父窗体上,用JS实现,主要是怎么取到GRIDVIEW选定的值,和怎么显示出来!
  高手们进!

子窗体代码:
<body style="width: 692px">
  <form id="form1" runat="server">
  <div>
  <asp:Label ID="Label1" runat="server" Text="所在校区:"></asp:Label>
  <asp:DropDownList ID="ddl_AreaName" runat="server" Width="150px" AutoPostBack="True" OnSelectedIndexChanged="ddlAreaName_SelectedIndexChanged">
  </asp:DropDownList> &nbsp&nbsp&nbsp&nbsp&nbsp
  <asp:Label ID="Label2" runat="server" Text="楼栋名称:"></asp:Label> 
  <asp:DropDownList ID="ddl_HouseName" runat="server">
  </asp:DropDownList>
  &nbsp&nbsp&nbsp&nbsp&nbsp
  <asp:Button ID="Btn_search" runat="server" Text="查询" 
  onclick="Btn_search_Click" />&nbsp&nbsp&nbsp&nbsp&nbsp
  <input name="button" type="button" id="btnhouseselects" style="background:images/c3.jpg; width: 68px; height: 22px" onClick="rvID()" value="确定" /> &nbsp&nbsp&nbsp&nbsp&nbsp
  <asp:Button ID="btn_cancel" runat="server" Text="取消" 
  onclick="btn_cancel_Click" />
  </div>
  <div>
 <asp:GridView ID="gvhousetable" runat="server" AutoGenerateColumns="False" PageSize="15" 
  Width="700px" Height="400px" ForeColor="#333333"  
  onpageindexchanging="gvhousetable_PageIndexChanging" AllowPaging="True"
  onrowdatabound="gvhousetable_RowDataBound" >
  <Columns>
  <asp:TemplateField>
  <HeaderTemplate >请选择</HeaderTemplate> 
  <ItemTemplate>
  <asp:CheckBox ID="cbk" runat="server" />
  <asp:HiddenField ID="hfid" Value='<%#Eval("id") %>' runat="server" />
  </ItemTemplate>
<HeaderStyle HorizontalAlign="Center" Width="40px" />
  </asp:TemplateField>
  <asp:BoundField DataField="AreaName" HeaderText="所在校区" />
  <asp:BoundField DataField="HouseCode" HeaderText="楼栋编号" />
  <asp:BoundField DataField="HouseName" HeaderText="楼栋名称" />
   
  </Columns>
  <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
  </asp:GridView>
  </div>
  </form>
</body>

父窗体代码:
 <tr>
  <td height="25" align="right">
  房屋数据:
  </td>
  <td>&nbsp&nbsp&nbsp&nbsp  
 <b> <%--<input n