Hi Dharmendar
It is my Parent window Html
<%@ Page Title="" Language="VB" MasterPageFile="~/inc/Site.master" AutoEventWireup="false" CodeFile="Purchase_Inv_add.aspx.vb" Inherits="mod_Sales_Dept_Purchase_Inv_add" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script type="text/javascript">
var popup;
function SelectName() {
popup = window.open("ProductSearch.aspx", "Popup", "width=700,height=400");
popup.focus();
return false
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<h4 class="box-title"><asp:Label ID="lblaction" runat="server"></asp:Label></h4>
<asp:UpdatePanel id="UpdatePanel1" runat="server">
<ContentTemplate>
<fieldset>
<div class="row">
<div class="col-lg-1">
<asp:Label ID="Label2" runat="server" Text="Doc No" Visible="true"></asp:Label>
<asp:TextBox ID="txtDocNo" runat="server" CssClass="form-control cbo" Enabled="false" Visible="true"></asp:TextBox>
</div>
<div class="col-lg-1">
<asp:Label ID="Label1" runat="server" Text="Doc Date" Visible="true"></asp:Label>
<asp:TextBox ID="txtDocDate" runat="server" CssClass="form-control cbo" Enabled="true" Visible="true"></asp:TextBox>
<asp:CalendarExtender ID="txtDocDate_CalendarExtender" runat="server" Enabled="True" TargetControlID="txtDocDate" Format="dd-MM-yyyy">
</asp:CalendarExtender>
</div>
<div class="col-lg-1">
<asp:Label ID="Label3" runat="server" Text="ID" Visible="false"></asp:Label>
<asp:TextBox ID="txtID" runat="server" CssClass="form-control cbo" Enabled="false" Visible="false" ></asp:TextBox>
</div>
<div class="col-lg-1">
<asp:Label ID="Label4" runat="server" Text="Type" Visible="false"></asp:Label>
<asp:TextBox ID="txtType" runat="server" CssClass="form-control cbo" Enabled="false" Text="PI" Visible="false"></asp:TextBox>
</div>
<div class="col-lg-1">
<asp:Label ID="Label5" runat="server" Text="Currency" Visible="false"></asp:Label>
<asp:TextBox ID="txtCurrCode" runat="server" CssClass="form-control cbo" Enabled="false" Text="RM" Visible="false" ></asp:TextBox>
</div>
</div>
<br />
<div class="row">
<div class="col-lg-7">
<div class="panel panel-primary">
<div class="panel-heading"><h4 class="panel-title">Supplier Details</h4></div>
<div class="panel-body">
<div class="row">
<div class="col-lg-2">
<asp:Label ID="Label8" runat="server" Text="Ac No"></asp:Label>
<asp:DropDownList ID="cboCode" runat="server" CssClass="form-control cbo" AutoPostBack="true" AppendDataBoundItems="true"></asp:DropDownList>
</div>
<div class="col-lg-3">
<asp:Label ID="Label9" runat="server" Text="Name"></asp:Label>
<asp:TextBox ID="txtName" runat="server" CssClass="form-control" Enabled="false"></asp:TextBox>
</div>
</div>
<div class="row">
<div class="col-lg-3">
<asp:Label ID="Label7" runat="server" Text="Supp Inv"></asp:Label>
<asp:TextBox ID="txtCustPO" runat="server" CssClass="form-control" Enabled="true" Width="150px"></asp:TextBox>
</div>
<div class="col-lg-3">
<asp:Label ID="Label6" runat="server" Text="Sales Persopn"></asp:Label>
<asp:DropDownList ID="cboSalesPerson" runat="server" CssClass="form-control" Width="150px"></asp:DropDownList>
</div>
<div class="col-lg-1">
<asp:Label ID="Label30" runat="server" Text="SaleType"></asp:Label>
<asp:TextBox ID="txtSalesType" runat="server" CssClass="form-control cbo" Enabled="false"></asp:TextBox>
</div>
</div>
<div class="row">
<div class="col-lg-3">
<asp:Label ID="Label10" runat="server" Text="Trans.Type"></asp:Label>
<asp:DropDownList ID="cboTransType" runat="server" CssClass="form-control" Width="150px" AppendDataBoundItems="true" ></asp:DropDownList>
</div>
<div class="col-lg-3">
<asp:Panel ID="Panel4" runat="server" DefaultButton="btnTransChg">
<asp:Label ID="Label11" runat="server" Text="Trans.Chg"></asp:Label>
<asp:TextBox ID="txtTransChg" runat="server" CssClass="form-control" Enabled="true" Width="150px"></asp:TextBox>
<asp:Button ID="btnTransChg" runat="server" style="display:none"/>
</asp:Panel>
</div>
<div class="col-lg-1">
<asp:Label ID="Label12" runat="server" Text="Trans.GST"></asp:Label>
<asp:TextBox ID="txtTransGST" runat="server" CssClass="form-control cbo" Enabled="false"></asp:TextBox>
</div>
</div>
<div class="row">
<div class="col-lg-2">
<asp:Label ID="Label33" runat="server" Text="Qty"></asp:Label>
<asp:TextBox ID="txtTotalQty" runat="server" CssClass="form-control cbo" Enabled="false"></asp:TextBox>
</div>
<div class="col-lg-2">
<asp:Label ID="Label31" runat="server" Text="Disc.Amt"></asp:Label>
<asp:TextBox ID="txtTotalDiscAmt" runat="server" CssClass="form-control cbo" Enabled="false"></asp:TextBox>
</div>
<div class="col-lg-2">
<asp:Label ID="Label15" runat="server" Text="GST.Amt"></asp:Label>
<asp:TextBox ID="txtTotalGSTR" runat="server" CssClass="form-control cbo" Enabled="false"></asp:TextBox>
</div>
<div class="col-lg-1">
<asp:Label ID="Label16" runat="server" Text="Nett"></asp:Label>
<asp:TextBox ID="txtTotalNETT" runat="server" CssClass="form-control cbo" Enabled="false"></asp:TextBox>
</div>
</div>
<div class="row">
<div class="col-lg-2">
<asp:Label ID="Label32" runat="server" Text="GrandTotal" Visible="true"></asp:Label>
<asp:TextBox ID="txtOverALLTotal" runat="server" CssClass="form-control cbo" Enabled="false" Visible="true"></asp:TextBox>
</div>
<div class="col-lg-2">
<asp:Label ID="Label17" runat="server" Text="Status"></asp:Label>
<asp:DropDownList ID="cboStatus" runat="server" CssClass="form-control cbo"></asp:DropDownList>
</div>
</div>
<div class="row">
<div class="col-lg-1">
<asp:Label ID="Label14" runat="server" Text="Grand.Total" Visible="false"></asp:Label>
<asp:TextBox ID="txtGrandTotal" runat="server" CssClass="form-control cbo" Enabled="false" Visible="false"></asp:TextBox>
</div>
<div class="col-lg-1">
<asp:Label ID="Label13" runat="server" Text="Total" Visible="false"></asp:Label>
<asp:TextBox ID="txtTotal" runat="server" CssClass="form-control cbo" Enabled="false" Visible="false"></asp:TextBox>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-5">
<div class="panel panel-primary">
<div class="panel-heading"><h4 class="panel-title">Products Search</h4></div>
<div class="panel-body">
<div class="row">
<div class="col-lg-3">
<asp:Panel ID="Panel5" runat="server" DefaultButton="btnSearch">
<asp:TextBox ID="txtSearch" runat="server" CssClass="form-control"></asp:TextBox>
<asp:Button ID="btnSearch" runat="server" Text="..." style="display:none"/>
</asp:Panel>
</div>
</div>
<div class="grid_scroll grid_scroll_small">
<asp:GridView ID="GridView1" runat="server" CssClass="gridview" AutoGenerateColumns="False" BackColor="White" BorderColor="#E7E7FF" BorderStyle="None"
BorderWidth="1px" CellPadding="3" GridLines="Horizontal" PageSize="15" Font-Names="Calibri" Font-Size="Small">
<AlternatingRowStyle BackColor="#F7F7F7" />
<Columns>
<asp:CommandField ShowSelectButton="True"><ItemStyle Width="50px" /></asp:CommandField>
<asp:BoundField DataField="id" InsertVisible="False" ReadOnly="True" SortExpression="id" Visible="true" HeaderText="ID"/>
<asp:BoundField DataField="itemid" HeaderText="Item Code"/>
<asp:BoundField DataField="itemdes" HeaderText="Description"/>
<%-- <asp:BoundField DataField="Category" HeaderText="Category"/>
<asp:BoundField DataField="uom" HeaderText="UOM"/>
<asp:BoundField DataField="Suppprice" HeaderText="SuppPrice"/>
<asp:BoundField DataField="taxcode" HeaderText="Tax Code"/>--%>
</Columns>
<FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
<HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
<PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
<RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
<SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
<SortedAscendingCellStyle BackColor="#F4F4FD" />
<SortedAscendingHeaderStyle BackColor="#5A4C9D" />
<SortedDescendingCellStyle BackColor="#D8D8F0" />
<SortedDescendingHeaderStyle BackColor="#3E3277" />
</asp:GridView>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-info">
<div class="panel-heading"><h4 class="panel-title">Item Details</h4></div>
<div class="panel-body">
<div class="row">
<div class="col-lg-2">
<asp:Panel ID="Panel1" runat="server" DefaultButton="btnSearchProdDetails">
<asp:Label ID="Label18" runat="server" Text="Item ID"></asp:Label>
<asp:TextBox ID="txtItemID" runat="server" CssClass="form-control" Enabled="true" Width="180px" ClientIDMode="Static"></asp:TextBox>
<asp:Button ID="btnSearchProdDetails" runat="server" Text="." Height="1px" Width="1px" Visible="true" BorderStyle="None" BackColor="window"/>
</asp:Panel>
</div>
<div class="col-lg-3">
<asp:Label ID="Label19" runat="server" Text="Description"></asp:Label>
<asp:TextBox ID="txtItemDesc" runat="server" CssClass="form-control" Enabled="false" Width="270px"></asp:TextBox>
<asp:Button ID="btnItemDesSearch" runat="server" Text="Search" OnClientClick="SelectName();" Visible="false" />
</div>
<div class="col-lg-1">
<asp:Label ID="Label21" runat="server" Text="Price"></asp:Label>
<asp:TextBox ID="txtPrice" runat="server" CssClass="form-control cbo" Enabled="false" Text="0.00"></asp:TextBox>
</div>
<div class="col-lg-1">
<asp:Panel ID="Panel2" runat="server" DefaultButton="btnCalc">
<asp:Label ID="Label22" runat="server" Text="Qty"></asp:Label>
<asp:TextBox ID="txtQty" runat="server" CssClass="form-control cbo" Enabled="true" ></asp:TextBox>
<asp:Button ID="btnCalc" runat="server" style="display:none"/>
</asp:Panel>
</div>
<div class="col-lg-1">
<asp:Panel ID="Panel3" runat="server" DefaultButton="btnCalcDisc">
<asp:Label ID="Label23" runat="server" Text="Disc(%)"></asp:Label>
<asp:TextBox ID="txtDisc" runat="server" CssClass="form-control cbo" Enabled="true" ></asp:TextBox>
<asp:Button ID="btnCalcDisc" runat="server" style="display:none"/>
</asp:Panel>
</div>
<div class="col-lg-1">
<asp:Label ID="Label25" runat="server" Text="Amount"></asp:Label>
<asp:TextBox ID="txtAmount" runat="server" CssClass="form-control cbo" Enabled="false" Text="0.00"></asp:TextBox>
</div>
<div class="col-lg-1">
<asp:Label ID="Label28" runat="server" Text="GST Amt"></asp:Label>
<asp:TextBox ID="txtGSTR" runat="server" CssClass="form-control cbo" Enabled="false" Text="0.00"></asp:TextBox>
</div>
<div class="col-lg-1">
<asp:Label ID="Label29" runat="server" Text="Amount"></asp:Label>
<asp:TextBox ID="txtNett" runat="server" CssClass="form-control cbo" Enabled="false" Text="0.00"></asp:TextBox>
</div>
</div>
<div class="row">
<div class="col-lg-1">
<asp:Label ID="Label34" runat="server" Text="ExpiryDate"></asp:Label>
<asp:TextBox ID="txtExpiryDate" runat="server" CssClass="form-control cbo"></asp:TextBox>
<asp:CalendarExtender ID="txtExpiryDate_CalendarExtender" runat="server" Enabled="True" TargetControlID="txtExpiryDate" Format="dd-MM-yyyy">
</asp:CalendarExtender>
</div>
<div class="col-lg-1">
<asp:Label ID="Label41" runat="server" Text="." ></asp:Label>
<asp:Button CssClass="btn btn-primary" ID="btnGridAdd" runat="server" Text="Add (+)" Height="30px"/>
</div>
</div>
<div class="row">
<div class="col-lg-1">
<asp:Label ID="Label20" runat="server" Text="UOM" Visible="false"></asp:Label>
<asp:TextBox ID="txtUOM" runat="server" CssClass="form-control cbo" Enabled="false" Visible="false"></asp:TextBox>
</div>
<div class="col-lg-1">
<asp:Label ID="Label24" runat="server" Text="Disc Amt" Visible="false"></asp:Label>
<asp:TextBox ID="txtDiscAmt" runat="server" CssClass="form-control cbo" Enabled="false" Visible="false"></asp:TextBox>
</div>
<div class="col-lg-1">
<asp:Label ID="Label26" runat="server" Text="GST(%)" Visible="false"></asp:Label>
<asp:TextBox ID="txtGSTP" runat="server" CssClass="form-control cbo" Enabled="false" Visible="false"></asp:TextBox>
</div>
<div class="col-lg-1">
<asp:Label ID="Label27" runat="server" Text="Tax Code" Visible="false"></asp:Label>
<asp:TextBox ID="txtTaxCode" runat="server" CssClass="form-control cbo" Enabled="false" Width="70px" Visible="false"></asp:TextBox>
</div>
</div>
</div>
</div>
<div class="box-footer">
<asp:Button ID="btnSave" runat="server" Text="Submit" CssClass="btn btn-primary" />
<asp:Button ID="btnPrint" runat="server" Text="Print" CssClass="btn btn-primary" />
<asp:Button ID="btnBack" runat="server" Text="Back" CssClass="btn btn-primary" />
</div>
<%-- </fieldset>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel id="UpdatePanel2" runat="server">
<ContentTemplate>
<fieldset>--%>
<div class="well well-sm">
<div class="row">
<div class="col-lg-12">
<asp:GridView ID="gv" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" BorderStyle="Solid"
BorderWidth="1px" CellPadding="3" Width="100%" ForeColor="Black" GridLines="Vertical" CssClass="gridview">
<AlternatingRowStyle BackColor="#CCCCCC" />
<Columns>
<asp:CommandField ShowSelectButton="true" />
<%-- <asp:CommandField ShowEditButton="true" />--%>
<asp:TemplateField HeaderText = "SNo" ItemStyle-Width="10">
<ItemTemplate>
<asp:Label ID="lblRowNumber" Text='<%# Container.DataItemIndex + 1 %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="itemid" HeaderText="Item ID" />
<asp:BoundField DataField="itemdes" HeaderText="Description" />
<asp:BoundField DataField="uom" HeaderText="UOM" />
<asp:BoundField DataField="price" HeaderText="Price" ><ItemStyle HorizontalAlign="Right" /></asp:BoundField>
<asp:BoundField DataField="qty" HeaderText="Qty" ><ItemStyle HorizontalAlign="Right" /></asp:BoundField>
<asp:BoundField DataField="disc" HeaderText="Disc(%)" ><ItemStyle HorizontalAlign="Right" /></asp:BoundField>
<asp:BoundField DataField="discAmt" HeaderText="Disc Amt" ><ItemStyle HorizontalAlign="Right" /></asp:BoundField>
<asp:BoundField DataField="amount" HeaderText="Amount" ><ItemStyle HorizontalAlign="Right" /></asp:BoundField>
<asp:BoundField DataField="gstp" HeaderText="GSTP" ><ItemStyle HorizontalAlign="Right" /></asp:BoundField>
<asp:BoundField DataField="gstr" HeaderText="GSTR" ><ItemStyle HorizontalAlign="Right" /></asp:BoundField>
<asp:BoundField DataField="nett" HeaderText="Nett" ><ItemStyle HorizontalAlign="Right" /></asp:BoundField>
<asp:BoundField DataField="taxcode" HeaderText="TaxCode" />
<asp:BoundField DataField="expirydate" HeaderText="Expiry Date" />
<asp:CommandField ShowDeleteButton="true" />
</Columns>
<FooterStyle BackColor="#CCCCCC" />
<HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#808080" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#383838" />
</asp:GridView>
</div>
</div>
</div>
</fieldset>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
It is my Popup windows html
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ProductSearch.aspx.vb" Inherits="mod_Purchase_Dept_ProductSearch" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Product Search</title>
</head>
<body>
<form id="form1" runat="server">
<asp:Label ID="Label1" runat="server" Text="Select Item Name"></asp:Label>
<asp:TextBox ID="txtSearch" runat="server"></asp:TextBox>
<asp:Button ID="btnSearch" runat="server" Text="Search" />
<asp:TextBox ID="txtItemName" runat="server"></asp:TextBox>
<asp:Button ID="btnSelectItem" runat="server" Text="select Item" OnClientClick="return SelectName()" />
<div>
<script type="text/javascript">
function SelectName() {
if (window.opener != null && !window.opener.closed) {
var form = window.opener.document.getElementsByTagName("form")[0];
var txtName = GetElement(form, "span", "txtItemID");
txtName.innerHTML = document.getElementById("txtItemName").value;
}
//return false;
window.close();
}
function GetElement(parent, tagName, id) {
var elem = parent.getElementsByTagName(tagName);
for (var i = 0; i < parent.getElementsByTagName(tagName).length; i++) {
if (elem[i].id.indexOf(id) != -1) {
return elem[i];
}
}
return null;
}
</script>
<br />
<asp:GridView ID="GridView1" runat="server" CssClass="gridview" AutoGenerateColumns="False" BackColor="White" BorderColor="#E7E7FF" BorderStyle="None"
BorderWidth="1px" CellPadding="3" GridLines="Horizontal" PageSize="15" Font-Names="Calibri" Font-Size="Small">
<AlternatingRowStyle BackColor="#F7F7F7" />
<Columns>
<%-- <asp:TemplateField>
<AlternatingItemTemplate>
<asp:Button ID="btnSelect" runat="server" Text="Select" />
</AlternatingItemTemplate>
<ItemTemplate>
<asp:Button ID="btnSelect" runat="server" Text="Select" />
</ItemTemplate>
</asp:TemplateField>--%>
<asp:CommandField ShowSelectButton="True"><ItemStyle Width="50px" /></asp:CommandField>
<asp:BoundField DataField="id" InsertVisible="False" ReadOnly="True" SortExpression="id" Visible="true" HeaderText="ID"/>
<asp:BoundField DataField="itemid" HeaderText="Item Code"/>
<asp:BoundField DataField="itemdes" HeaderText="Description"/>
<asp:BoundField DataField="Category" HeaderText="Category"/>
<asp:BoundField DataField="uom" HeaderText="UOM"/>
<asp:BoundField DataField="Suppprice" HeaderText="SuppPrice"/>
<asp:BoundField DataField="taxcode" HeaderText="Tax Code"/>
</Columns>
<FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
<HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
<PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
<RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
<SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
<SortedAscendingCellStyle BackColor="#F4F4FD" />
<SortedAscendingHeaderStyle BackColor="#5A4C9D" />
<SortedDescendingCellStyle BackColor="#D8D8F0" />
<SortedDescendingHeaderStyle BackColor="#3E3277" />
</asp:GridView>
</div>
</form>
</body>
</html>
Pls advice.
Thank you
Maideen