So I am using a Modal Popup for gridview editing. The gridview is a child gridview of another gridview. I have moved the modal popup out of the updatepanel due to issues of it adding commas to the beginning of the textbox on submitting it to database. The textbox was being populated prior to me moving the modal popup out of the update panel, however now since it is no longer in the update panel with the gridview, it does not populate the text boxes with the gridview data. Any one have any suggestions?
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div style="background-color:white;text-align:center; padding:10px;border-radius:15px;box-shadow:5px 10px 15px #303A4C;margin-left:auto;margin-right:auto; max-width:100%;min-width:30%;float:left;">
<h2 class="h2title">
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true" style="float:left;margin-left:10px;">
<asp:ListItem Value="0">--Select--</asp:ListItem>
<asp:ListItem Value="1">Options</asp:ListItem>
<asp:ListItem Value="2">Parts</asp:ListItem>
<asp:ListItem Value="3">Bid Rates</asp:ListItem>
</asp:DropDownList>
Purchasing Approval</h2>
<asp:Panel ID="panel1" runat="server" Visible="false" Width="100%">
<div class="griddiv" style="overflow-y:scroll;max-height:500px; max-width:80%;">
<asp:GridView ID="GridView1" runat="server" Font-Size="Medium" CellPadding="5" GridLines="None" AutoGenerateColumns="False"
RowStyle-CssClass="rows" HeaderStyle-CssClass="gridheader" DataKeyNames="batchID" OnRowDataBound="OnRowDataBound" >
<Columns>
<asp:TemplateField>
<ItemTemplate>
<img alt = "" style="cursor: pointer" src="../img/plus.png" />
<asp:Panel ID="childpanel" runat="server" Style="display: none;">
<div class="griddiv" style="overflow-y:scroll;max-height:500px; max-width:80%;">
<asp:GridView ID="gvchild" runat="server" Font-Size="Medium" CellPadding="5" GridLines="None" AutoGenerateColumns="False"
CssClass="datagrid1" RowStyle-CssClass="rows" HeaderStyle-CssClass="gridheader" DataKeyNames="id">
<Columns>
<asp:TemplateField ItemStyle-Width = "30px" HeaderText = "">
<ItemTemplate>
<asp:LinkButton ID="lnkEdit" runat="server" Text = "Edit" OnClick = "Edit"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Option Number">
<ItemTemplate>
<asp:Label ID="optionnumtemp" runat="server" Text='<%#Eval("optionnum") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField ItemStyle-Width="150px" DataField="id" HeaderText="ID" />
<asp:BoundField ItemStyle-Width="150px" DataField="optionnum" HeaderText="Option Number" />
<asp:BoundField ItemStyle-Width="150px" DataField="optiondesc" HeaderText="Option Description" />
<asp:BoundField ItemStyle-Width="150px" DataField="optioncat" HeaderText="Option Category" />
<asp:BoundField ItemStyle-Width="150px" DataField="houseplan" HeaderText="House Plan" />
<asp:BoundField ItemStyle-Width="150px" DataField="craftcode" HeaderText="Craft Code" />
<asp:BoundField ItemStyle-Width="150px" DataField="parentoption" HeaderText="Parent Option" />
<asp:TemplateField>
<HeaderTemplate>
<asp:CheckBox runat="server" ID="chkHeader" TextAlign="Right"/>
</HeaderTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox runat="server" ID="chkRow"/>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</asp:Panel>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField = "batchID" HeaderText = "Batch ID" HtmlEncode = "true" HeaderStyle-Width="25%" />
<asp:BoundField DataField = "requestdate" HeaderText = "Request Date" HtmlEncode = "true" HeaderStyle-Width="25%" />
<asp:BoundField DataField = "requestby" HeaderText = "Requested By" HtmlEncode = "true" HeaderStyle-Width="25%"/>
<asp:BoundField DataField = "entityname" HeaderText = "Division" HtmlEncode = "true" HeaderStyle-Width="25%"/>
</Columns>
</asp:GridView>
<div class="button">
<asp:Button ID="Button" runat="server" Text="Complete" />
</div>
</div>
</asp:Panel>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID = "GridView1" />
<asp:AsyncPostBackTrigger ControlID = "btnSave" />
</Triggers>
</asp:UpdatePanel>
<asp:Panel ID="pnlAddEdit" runat="server" CssClass="modalPopup" style = "display:none">
<asp:Label Font-Bold = "true" ID = "Label4" runat = "server" Text = "Option Request" ></asp:Label>
<br />
<table align = "center">
<tr>
<td>
<asp:Label ID="rowid" runat="server" Text = "ID"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID = "Label1" runat = "server" Text = "Option Number" ></asp:Label>
</td>
<td>
<asp:TextBox ID="optionnumtxt" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID = "Label2" runat = "server" Text = "Option Description" ></asp:Label>
</td>
<td>
<asp:TextBox ID="optiondesctxt" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID = "Label3" runat = "server" Text = "Option Category" ></asp:Label>
</td>
<td>
<asp:TextBox ID="optcattxt" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID = "Label5" runat = "server" Text = "House Plan" ></asp:Label>
</td>
<td>
<asp:TextBox ID="houseplantxt" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID = "Label6" runat = "server" Text = "Craft Code" ></asp:Label>
</td>
<td>
<asp:TextBox ID="craftcodetxt" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID = "Label7" runat = "server" Text = "Parent Option" ></asp:Label>
</td>
<td>
<asp:TextBox ID="parentoptiontxt" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Button ID="btnSave" runat="server" Text="Save" OnClick = "Save" />
</td>
<td>
<asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClientClick = "return Hidepopup()"/>
</td>
</tr>
</table>
</asp:Panel>
<asp:LinkButton ID="lnkFake" runat="server"></asp:LinkButton>
<ajax:ModalPopupExtender ID="popup" runat="server" DropShadow="false"
PopupControlID="pnlAddEdit" TargetControlID = "lnkFake"
BackgroundCssClass="modalBackground">
</ajax:ModalPopupExtender>
Protected Sub Edit(ByVal sender As Object, ByVal e As EventArgs)
For Each gvrow As GridViewRow In GridView1.Rows
Dim gvchild As GridView = TryCast(gvrow.FindControl("gvchild"), GridView)
Dim row As GridViewRow = CType(CType(sender, LinkButton).Parent.Parent, GridViewRow)
rowid.Text = row.Cells(1).Text
optionnumtxt.Text = row.Cells(2).Text
optiondesctxt.Text = row.Cells(3).Text
optcattxt.Text = row.Cells(4).Text
houseplantxt.Text = row.Cells(5).Text
craftcodetxt.Text = row.Cells(6).Text
parentoptiontxt.Text = row.Cells(7).Text
popup.Show()
Next
End Sub