title: How can i have a gridview or details view in a popup
body: <p>This is my design </p>
  
  <pre><code>  &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server"&gt;
      &lt;ContentTemplate&gt;
          &lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Font-Names="Arial"
              Font-Size="11pt" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px"
              CellPadding="4" OnRowCommand="GridView1_RowCommand"&gt;
              &lt;Columns&gt;
                  &lt;asp:TemplateField&gt;
                      &lt;HeaderTemplate&gt;
                          &lt;asp:CheckBox ID="CheckAll" onclick="return check_uncheck (this );" runat="server" /&gt;
                      &lt;/HeaderTemplate&gt;
                      &lt;ItemTemplate&gt;
                          &lt;asp:Label ID="ID" Visible="false" Text='&lt;%# DataBinder.Eval (Container.DataItem, "Id") %&gt;'
                              runat="server" /&gt;
                          &lt;asp:CheckBox ID="deleteRec" onclick="return check_uncheck (this );" runat="server" /&gt;
                      &lt;/ItemTemplate&gt;
                  &lt;/asp:TemplateField&gt;
                  &lt;asp:TemplateField HeaderText="Id" SortExpression="Id"&gt;
                      &lt;EditItemTemplate&gt;
                          &lt;asp:Label ID="Label1" runat="server" Text='&lt;%# Eval("Id") %&gt;'&gt;&lt;/asp:Label&gt;
                      &lt;/EditItemTemplate&gt;
                      &lt;ItemTemplate&gt;
                          &lt;asp:Label ID="Label1" runat="server" Text='&lt;%# Bind("Id") %&gt;'&gt;&lt;/asp:Label&gt;
                      &lt;/ItemTemplate&gt;
                  &lt;/asp:TemplateField&gt;
                  &lt;asp:TemplateField HeaderText="FileName" SortExpression="FileName"&gt;
                      &lt;EditItemTemplate&gt;
                          &lt;asp:Label ID="LblFileName" runat="server" Text='&lt;%# Eval("FileName") %&gt;'&gt;&lt;/asp:Label&gt;
                      &lt;/EditItemTemplate&gt;
                      &lt;ItemTemplate&gt;
                          &lt;asp:Label ID="LblFileName1" runat="server" Text='&lt;%# Bind("FileName") %&gt;'&gt;&lt;/asp:Label&gt;
                          &lt;asp:ImageButton ID="img" runat="Server" CommandName="Image" ImageUrl="~/Images/pen.png" /&gt;
                      &lt;/ItemTemplate&gt;
                  &lt;/asp:TemplateField&gt;
              &lt;/Columns&gt;
              &lt;AlternatingRowStyle BackColor="White" /&gt;
              &lt;RowStyle BackColor="#F7F7DE" /&gt;
              &lt;FooterStyle BackColor="#CCCC99" /&gt;
              &lt;PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" /&gt;
              &lt;SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" /&gt;
              &lt;HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" /&gt;
          &lt;/asp:GridView&gt;
          &lt;asp:Panel ID="pnlAddEdit" runat="server" CssClass="modalPopup" Style="display: none"
              Width="1000px"&gt;
              &lt;asp:Label Font-Bold="true" ID="Label4" runat="server" Text="File Data"&gt;&lt;/asp:Label&gt;
              &lt;br /&gt;
              &lt;table align="center" width="1000px"&gt;
                  &lt;tr&gt;
                      &lt;td&gt;
                          &lt;asp:Label ID="Label1" runat="server" Text="RecordTypeCode"&gt;&lt;/asp:Label&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;asp:Label ID="lblRec" runat="server" Text="Content"&gt;&lt;/asp:Label&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;
                          &lt;asp:Label ID="lblFileHeader" runat="server" Text="FileHeader"&gt;&lt;/asp:Label&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;asp:Label ID="txtCustomerID" Width="500px" MaxLength="5" runat="server"&gt;&lt;/asp:Label&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;
                          &lt;asp:Label ID="lblBatchHeader" runat="server" Text="BatchHeader"&gt;&lt;/asp:Label&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;asp:Label ID="txtBatch" runat="server"&gt;&lt;/asp:Label&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;
                          &lt;asp:Label ID="Label2" runat="server" Text="EntryDetail"&gt;&lt;/asp:Label&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;asp:Label ID="txtEntry" runat="server"&gt;&lt;/asp:Label&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;
                          &lt;asp:Button ID="btnSave" runat="server" Text="Save" /&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClientClick="return Hidepopup()" /&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
          &lt;/asp:Panel&gt;
          &lt;asp:LinkButton ID="lnkFake" runat="server"&gt;&lt;/asp:LinkButton&gt;
          &lt;cc1:ModalPopupExtender ID="popup" runat="server" DropShadow="false" PopupControlID="pnlAddEdit"
              TargetControlID="lnkFake" BackgroundCssClass="modalBackground"&gt;
          &lt;/cc1:ModalPopupExtender&gt;
      &lt;/ContentTemplate&gt;
      &lt;Triggers&gt;
          &lt;asp:AsyncPostBackTrigger ControlID="GridView1" /&gt;
          &lt;asp:AsyncPostBackTrigger ControlID="btnSave" /&gt;
      &lt;/Triggers&gt;
  &lt;/asp:UpdatePanel&gt;
  </code></pre>
  
  <p>I have taken some text boxes inside a panel when a pop-up opens but instead of that i need a gridview to be there as i have to display the content of a large file</p>
  
  <p>This is my data </p>
  
  <pre><code> 101 111100022 5104885671104200936A094101CapitalOne                           MudiamInc        
  5220MudiamInc                           A510488567CCDITServices000000110422   1111100020000001
  622968765348545646565        00004000001007           rajeshk                 1111100020000001
  62297877654775676546546      00002888891007           rajeshk                 1111100020000002
  82200000020194754188000000000000000000688889A510488567                         111100020000001
  5220MudiamInc                           A510488567CCDITServices000000110422   1111100020000002
  62212345678034354465677      00000864451005           swethau                 1111100020000003
  62212345678087664534543      00000559841011           swathiK                 1111100020000004
  62212345678097867546435      00000579351012           lavanyaK                1111100020000005
  6221234567806754654435435    00000846761013           AnithaN                 1111100020000006
  82200000040049382712000000000000000000285040A510488567                         111100020000002
  9000002000001000000060244136900000000000000000071739300                                       
  </code></pre>
  
  <p>This i have to show sequentially in an order as </p>
  
  <pre><code>  RecordTyecode           Content
  
     FileHeader          Starting line to be here
     BatchHeader        Line that come's with 5(First come line)
     EntryDetail        Number of 6 line has to be added on by one
     BatchControl       line that starts with 8 has to be here
  </code></pre>
  
  <p>Again if i have line starts with <code>5</code> after <code>8</code> that has to be appended like above sequence</p>
  
  <p>Can any give me an idea to add this dynamically a little tricky to understand ask if any information required</p>
  
  <p>This was done in <code>winforms</code> exact i need in web too</p>
  
  <p><img src="https://i.stack.imgur.com/e1pKs.png" alt="enter image description here"></p>