This is a migrated thread and some comments may be shown as answers.

Default grid paging doesn't work

6 Answers 127 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Acadia
Top achievements
Rank 1
Iron
Acadia asked on 04 Nov 2008, 08:23 PM
I have the AllowPaging set to true but when I trey to move to the next page the grid comes up empty.  The indicator at the bottom says there are about 100 pages.

Doesn't the default paging take care of this at a basic level?  I'm not trying to do anything custom.

Here's my grid code:

 

<telerik:RadGrid ID="rgJ" runat="server" Skin="WebBlue" AutoGenerateColumns="False"

 

 

GridLines="None" AllowPaging="True" PageSize="15" AllowFilteringByColumn="True"

 

 

AllowSorting="True" Width="430px" Height="440px" AllowMultiRowSelection="false" PagerStyle-Mode="NextPrevAndNumeric" >

 

 

<MasterTableView ItemStyle-Height="10px">

 

 

<Columns>

 

 

<telerik:GridTemplateColumn UniqueName="cbJobSelect" AllowFiltering="false">

 

 

<ItemTemplate>

 

 

<asp:CheckBox ID="cbJob" runat="server" OnCheckedChanged="ToggleRowSelection" Width="30px"

 

 

AutoPostBack="True" />

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridBoundColumn DataField="JOB_CODE" HeaderText="Job Code" UniqueName="JOB_CODE"

 

 

ReadOnly="True">

 

 

<HeaderStyle HorizontalAlign="Left" Width="110px" Wrap="False" />

 

 

<ItemStyle HorizontalAlign="Right" Width="110px" Wrap="False" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="JOB_NAME" HeaderText="Job Name" UniqueName="JOB_NAME"

 

 

ReadOnly="True">

 

 

<HeaderStyle HorizontalAlign="Left" Width="250px" Wrap="False" />

 

 

<ItemStyle HorizontalAlign="Center" Width="250px" Wrap="False" />

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

<ExpandCollapseColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</ExpandCollapseColumn>

 

 

<RowIndicatorColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</RowIndicatorColumn>

 

 

</MasterTableView>

 

 

<ClientSettings>

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True" />

 

 

</ClientSettings>

 

 

<FilterMenu EnableTheming="True" Skin="WebBlue">

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

</FilterMenu>

Do I need to put something in the PageIndesxChanged event?

Thanks

6 Answers, 1 is accepted

Sort by
0
Acadia
Top achievements
Rank 1
Iron
answered on 04 Nov 2008, 08:33 PM
nevermind I got it.  I put the Loaddata() call in my pageIndexChanged event and it seems to be working fine.
0
Acadia
Top achievements
Rank 1
Iron
answered on 04 Nov 2008, 09:02 PM
But now it's doing the same thing when I filter and there is no Filtering event that i can see for the grid to put my LoadData function in.

How do you handle simple filtering with a rad grid?
0
Serrin
Top achievements
Rank 1
answered on 04 Nov 2008, 09:30 PM
Hey Acadia,

Are you using any filtering techniques like in this online demo?  Without seeing more of the code my best guess is that it somehow isn't persisting the data when you do a postback (unless this is in an AjaxPanel or something similar with other things going on around it).
0
Acadia
Top achievements
Rank 1
Iron
answered on 04 Nov 2008, 09:31 PM
Thanks for the reply, I figured it out a minute ago I needed to use advanced databinding instead of simple.

Thanks!
0
ghadeer
Top achievements
Rank 1
answered on 31 Dec 2008, 11:09 AM
Hello

I face the same problem....
what you mean by loaddata()??


please could you hepl me how you solve the problem??


ghadeer
0
Shinu
Top achievements
Rank 2
answered on 31 Dec 2008, 12:11 PM
Hello Ghadeer,

Make sure that you are using AdvancedDataBinding techniques to bind your grid with data. For more information, refer to the following help document:
Advanced data-binding

Loaddata(), is a function used in Acadia's case to bind data to the grid, which is not required in your case, i suppose.

Thanks
Shinu.
Tags
Grid
Asked by
Acadia
Top achievements
Rank 1
Iron
Answers by
Acadia
Top achievements
Rank 1
Iron
Serrin
Top achievements
Rank 1
ghadeer
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or