Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Save a gridview data which is inside another gridview's Rowdatabound

Avatar of RadhaKrishnaKiJaya
RadhaKrishnaKiJaya asked on
.NET ProgrammingC#ASP.NETVisual Basic.NETMicrosoft Development
7 Comments1 Solution187 ViewsLast Modified:
Hi Experts,

I have a gridview. one of its column has s plus sign. When I click the plus sign it makes the other gridview visible . When I click the minus sign it is invisible. Is there anyway I can save the data of the popup gridview in a dataset or a datatable when the minus sign is clicked. I have attached the screenshots.

Thanks in advance.


Code for + and -
----------------------------

 <script  type="text/javascript" src="Jqueries/jquery_nestedGrid.min.js"></script>
     <script type="text/javascript">
         $("[src*=plus]").live("click", function () {
             $(this).closest("tr").after("<tr><td></td><td colspan = '900'>" + $(this).next().html() + "</td></tr>")
             $(this).attr("src", "images/minus.png");
             
         });
         $("[src*=minus]").live("click", function () {
             $(this).attr("src", "images/plus.png");
             $(this).closest("tr").next().remove();
         });
     </script>


Gridview column
---------------------------
  <asp:TemplateField ItemStyle-Width="4%">
                    <ItemTemplate>
                        <asp:image alt = "" style="cursor: pointer;" src="images/plus.png" id="ImgPlusMinus" runat="server" />
                        <asp:Panel ID="pnlOrders" runat="server" Style="display: none">
                            <asp:GridView ID="gvVendors" runat="server" AutoGenerateColumns="false" CssClass = "ChildGrid SetLeftMarginChildGrid">
                                <Columns>
                                    <asp:BoundField DataField="VendorID" HeaderText="ID" visible="false" />
                                    <asp:BoundField ItemStyle-Width="300px" DataField="VendorName" HeaderText="Vendor" />
                                    <asp:BoundField ItemStyle-Width="100px" DataField="PartCost" HeaderText="Part Cost" />
                                    <asp:BoundField ItemStyle-Width="200px" DataField="PreferredVendor" HeaderText="Preferred Vendor" />
                                     <asp:TemplateField HeaderText="Qty. Ordered">
                                        <HeaderStyle Width="110px" HorizontalAlign="Left"/>
                                        <ItemStyle Width="50px" HorizontalAlign="Left"/>
                                        <ItemTemplate>
                                            <asp:textbox ID="txtQtyOrdered" runat="server" Width ="100px"></asp:textbox>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </asp:Panel>
                    </ItemTemplate>
                </asp:TemplateField>
Vendor1.png
Vendor2.png
ASKER CERTIFIED SOLUTION
Avatar of RadhaKrishnaKiJaya
RadhaKrishnaKiJaya

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 7 Comments.
See Answers