I have a very strange problem with my grid which I just cannot see the answer to. When my grid first loads, I click the 'Next' page button and the grid correctly raises the OnPageIndexChanged event and moves to the next page. I then click it again and the event does not fire and the grid returns to page index 0. On the first click the following events are raised:
NeedDataSource
OnPageIndexChanged
NeedDataSource
On the second click, I only get:
NeedDataSource
I am aiming to replicate the solution provided in this forum thread.
My grid definition is as follows. Can anybody see why this would happen?
I should also add that with NextPrevAndNumeric paging mode, selecting the page numbers works as expected every time.
Thanks in advance.
NeedDataSource
OnPageIndexChanged
NeedDataSource
On the second click, I only get:
NeedDataSource
I am aiming to replicate the solution provided in this forum thread.
My grid definition is as follows. Can anybody see why this would happen?
| <telerik:RadGrid runat="server" ID="EntitiesGrid" |
| OnNeedDataSource="EntitiesGrid_NeedDataSource" OnPageIndexChanged="EntitiesGrid_PageIndexChanged" |
| Width="100%" Height="300" GridLines="None" AllowPaging="true" |
| OnItemDataBound="EntitiesGrid_ItemDataBound" ShowHeader="false" |
| AllowMultiRowSelection="true" BorderWidth="0" Skin="Vista" EnableViewState="false"> |
| <PagerStyle Mode="NextPrevAndNumeric" /> |
| <MasterTableView TableLayout="Fixed" AutoGenerateColumns="false" BorderWidth="0" onmousedown="ShowContextMenu()"> |
| <Columns> |
| <telerik:GridTemplateColumn UniqueName="ImageColumn" ItemStyle-Width="35"></telerik:GridTemplateColumn> |
| <telerik:GridTemplateColumn UniqueName="NameColumn"></telerik:GridTemplateColumn> |
| <telerik:GridTemplateColumn UniqueName="DrillDownColumn" ItemStyle-Width="25"></telerik:GridTemplateColumn> |
| </Columns> |
| </MasterTableView> |
| <ClientSettings ApplyStylesOnClient="true"> |
| <Scrolling AllowScroll="true" UseStaticHeaders="true" /> |
| <Selecting AllowRowSelect="true" EnableDragToSelectRows="false" /> |
| <ClientEvents OnRowSelected="GridRowSelected" OnRowDeselected="GridRowDeselected" OnTableCreated="Resize" OnMasterTableViewCreated="Resize" /> |
| <Resizing EnableRealTimeResize="true" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
I should also add that with NextPrevAndNumeric paging mode, selecting the page numbers works as expected every time.
Thanks in advance.