Question : when adding Paging VB.Net GridView disappears

GridView id="grid" works without AllowPaging="true"
, but disappears when adding paging set out below:
The complete aspx & vb code as per attached file.
<div style=" position:absolute; width:812px; height:114px; left:-1px; top:204px; font-size:smaller; overflow:auto;  border: 2px solid #722F90; "
    id="DIV6">
<span id="aaaDiv6" style="position:absolute; top:2px; left:450px;"></span>
<!--START PAGE SECTION-->
<asp:GridView ID="grid"
 OnSelectedIndexChanged="grid_SelectedIndexChanged"
 OnPageIndexChanging="grid_PageIndexChanging"
 runat="server"  AutoGenerateColumns="False"
 style="z-index: 100; font-size:xx-small; left: 0px; position: absolute; top: 0px"
 AllowPaging="true"
 PageSize="3">
 <Columns>
 <asp:ButtonField CommandName="Select" Text="Select" />
 <asp:BoundField DataField="rec_ID" HeaderText="rec_ID" />
 <asp:BoundField DataField="Server_Name" HeaderText="Server_Name" />
 <asp:BoundField DataField="Table_Name" HeaderText="Table_Name"  />                                    
  </Columns>
 </asp:GridView>
<!--END PAGE SECTION CODE-->
</div>
Attachments:
 
Gridwiew paging
 

Answer : when adding Paging VB.Net GridView disappears

I can't see the page load event handler, and another problem is not binding the GridView after the post-back.  I see that you are setting the page size to 3, and that you are binding the grid after changing the PageIndex property, which would have been my guess.  The SqlDataSource control automatically coordinates paging with the GridView, but when you handle it manually, it needs to be handled correctly.  I used to do a get from the database on initial page load into a DataTable, and then store that into a session variable that could be retrieved on post-back, so that I didn't have to do a get again.  I never bind a data reader to the GridView, though, so there is another possibility for a problem, since a data reader gives you a forward-only view of the data.  Paging may require a different construct.
Random Solutions  
  •  CentOS 5.3: install: booting off USB: misunderstanding....is there a way I can INSTALL linux from an USB drive?
  •  JavaScript Error in IE7 menu hover background does not work
  •  Crystal reports how to insert page break dynamically
  •  Clearing a submit form once submitted
  •  How do I get our WAN address using Windows Power Shell
  •  Can you setup Remote Desktop Gateway and Remote Desktop Services on the same Server
  •  How do I make a database that stores data from a form with sections that have an unknown number of entries
  •  Configuring Netgear ProSafe DGFV338 for VPN Pass-through
  •  Sharepoint Designer 2010 install error "Microsoft Office 2010 does not support upgrading from a prerelease version of Microsoft Office 2010"
  •  the system cannot end this program because it is waiting for a response from you
  •  
    programming4us programming4us