Note that there are some explanatory texts on larger screens.

plurals
  1. POGridView paging always shows first page
    primarykey
    data
    text
    <p>I´m having a weird experience with paging on a GridView. I´m trying to lazy load data into my griview by using an updatepanel with a timer and updateprogress attached to it. So basicly what I´m trying to do is when the page with the grid loads I start the timer by enabling it. In the timer_tick event I´m fetching the data and load that into a variable. Then calling databind on the gridview forcing it to bind the data. Here I´m using a LinqDataSource to do that. Lastly I´m updating the UI via the Update method on the updatepanel. </p> <p>This all works fine with sorting and filtering on the gridview but when I´m paging it the grid pages like it should but the paging template always stays on the first page (show 1 as active). Any ideas people? Here is some of my code:</p> <pre><code> &lt;asp:LinqDataSource runat="server" ID="OrdersDataSource" OnSelecting="OrdersDataSource_Selecting" AutoPage="false" /&gt; &lt;asp:GridView runat="server" ID="OrdersGridView" AutoGenerateColumns="false" DataSourceID="OrdersDataSource" AllowPaging="true" AllowSorting="true" PageSize="3"&gt; &lt;Columns&gt; </code></pre> <p>...</p> <pre><code>&lt;asp:Timer runat="server" ID="LazyLoadUpdatePanel" Enabled="false" Interval="1" OnTick="LazyLoadUpdatePanel_Tick" /&gt; </code></pre> <p>...</p> <pre><code>protected void LazyLoadUpdatePanel_Tick(object sender, EventArgs e) { if (datasource == null) { System.Threading.Thread.Sleep(2000); datasource = customer.Orders; OrdersGridView.DataBind(); OrdersUpdatePanel.Update(); } LazyLoadUpdatePanel.Enabled = false; } </code></pre> <p>BTW I have tried with autopaging on the datasource and without it. That didn´t do the trick. As I said the paging seems to work, the UI just isn´t showing what it i supposed to.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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