hi team, i open a lookup window through javascript:window.open(x,y,z). on that lookup window the user will search and the data will be displayed in gridview.
open child window
Code:<input id="lookupButton" class="button_style" style="width: 30px; height: 20px" type="button" onclick="window.open('lookup.aspx','xxx','width=800,height=500,menubar=no,status=no')"
the gridview will contain columns for id, name, address,fax and tel. each of these column will be pass to the parent form namely idtextbox,addresstexbox, faxtextbox and teltextbox.
note that the id will be a hidden column in the gridview and a hidden type inputbox in the parent.
Code:<asp:GridView ID="GridView1" runat="server" Width="95%" AllowPaging="True" AutoGenerateColumns="False" GridLines="None" PageSize="10" > <RowStyle BackColor="#F7F6F3" ForeColor="#333333" /> <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" /> <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" /> <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> <EditRowStyle BackColor="#999999" /> <AlternatingRowStyle BackColor="White" ForeColor="#284775" /> <Columns> <asp:TemplateField HeaderText="ID"> <ItemTemplate><asp:Label ID="idlabel" runat="server"></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Name"> <ItemTemplate><asp:Label ID="namelabel" runat="server"></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Address"> <ItemTemplate><asp:Label ID="addresslabel" runat="server"></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Fax"> <ItemTemplate><asp:Label ID="faxlabel" runat="server"></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText ="Tel"> <ItemTemplate> <asp:Label ID="tellabel" runat="server"></asp:Label> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView>




Reply With Quote