Note that there are some explanatory texts on larger screens.

plurals
  1. POGridView paging control issue
    text
    copied!<p>I m using Grid view web control of asp.net ,i m using paging control in that, i handled paging event in that but it does not show data if i click on 2,3,4... so on link it is not displaying one result set..it does not give any exception but just displays nothing apart first page.here is the code : </p> <pre><code>public partial class Main : System.Web.UI.Page { protected string PostBackOption = ""; protected void Page_Load(object sender, EventArgs e) { this.check.Text = " "; if (Page.IsPostBack) { PostBackOption = "$(\"#dialog\").dialog(\"open\");"; } } List&lt;Allemployees&gt; result1 = new List&lt;Allemployees&gt;(); protected void Button1_Click(object sender, EventArgs e) { // Show all the employees currently in the table GridView1.DataSource = null; GridView1.DataBind(); using (var db = new AdventureWorks2012_DataEntities()) { List&lt;Allemployees&gt; result = new List&lt;Allemployees&gt;(); var query = from b in db.Employees join p in db.People on b.BusinessEntityID equals p.BusinessEntityID orderby p.BusinessEntityID select new { b.BusinessEntityID, p.FirstName, p.LastName }; foreach (var item in query) { Allemployees t1 = new Allemployees(); t1.BusinessEntityId = item.BusinessEntityID; t1.FirstName = item.FirstName; t1.LastName = item.LastName; result1.Add(t1); } GridView1.DataSource = result1; GridView1.DataBind(); } } protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e) { GridView1.PageIndex = e.NewPageIndex; GridView1.DataSource = result1; GridView1.DataBind(); } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload