Hello, I need assistance in getting my top pager and my bottom pager to remain in sync when the page is changed. I am using a asp:DataList, so I've had to set the pager up so that it calls the "PageIndexChanged" event and the TotalRowCountRequest event.
Is there a way to have the other pager respond as well when the events are triggered on the first pager?
Edit: I would like to emphasize that I'm using the asp:DataList, not the ListView. Thanks!
Thanks!
Here is the code:
Is there a way to have the other pager respond as well when the events are triggered on the first pager?
Edit: I would like to emphasize that I'm using the asp:DataList, not the ListView. Thanks!
Thanks!
Here is the code:
<
telerik:RadDataPager
ID
=
"RadDataPager1"
runat
=
"server"
OnPageIndexChanged
=
"RadDataPager_PageIndexChanged"
OnTotalRowCountRequest
=
"RadDataPager_TotalRowCountRequest"
OnPreRender
=
"RadDataPager_PreRender"
>
<
Fields
>
<
telerik:RadDataPagerTemplatePageField
HorizontalPosition
=
"LeftFloat"
>
<
PagerTemplate
>
<
div
style
=
"float: right;color:#666666;"
>
Displaying items
<
asp:Label
runat
=
"server"
ID
=
"PageItemFromLabel"
/>
to
<
asp:Label
runat
=
"server"
ID
=
"PageItemToLabel"
/>
of
<
asp:Label
runat
=
"server"
ID
=
"TotalItemsLabel"
/>
</
div
>
</
PagerTemplate
>
</
telerik:RadDataPagerTemplatePageField
>
<
telerik:RadDataPagerButtonField
FieldType
=
"NextLast"
HorizontalPosition
=
"RightFloat"
/>
<
telerik:RadDataPagerButtonField
FieldType
=
"Numeric"
HorizontalPosition
=
"RightFloat"
/>
<
telerik:RadDataPagerButtonField
FieldType
=
"FirstPrev"
HorizontalPosition
=
"RightFloat"
/>
</
Fields
>
</
telerik:RadDataPager
>
<
asp:DataList
ID
=
"lvUserImages"
runat
=
"server"
OnNeedDataSource
=
"lvUserImages_NeedDataSource"
RepeatColumns
=
3
CellPadding
=
10
ItemStyle-VerticalAlign
=
"Bottom"
RepeatDirection
=
"Horizontal"
OnItemDataBound
=
"lvUserImages_ItemDataBound"
>
<
ItemTemplate
>
<
asp:HyperLink
ID
=
"hlPost"
runat
=
"server"
>
<
div
class
=
"imgWrapper"
>
<
asp:Image
ID
=
"img"
runat
=
"server"
style
=
"max-width:300px"
/>
<
div
class
=
"imgTextOverlay"
>
<%# Eval("subject") %><
br
/>
Posted: <%# ((DateTime)Eval("postdate")).ToString("MM/dd/yyyy") %> | <%#Eval("replycount") %> replies
</
div
>
</
div
>
</
asp:HyperLink
>
</
ItemTemplate
>
</
asp:DataList
>
<
telerik:RadDataPager
ID
=
"RadDataPager2"
runat
=
"server"
OnPageIndexChanged
=
"RadDataPager_PageIndexChanged"
OnTotalRowCountRequest
=
"RadDataPager_TotalRowCountRequest"
OnPreRender
=
"RadDataPager_PreRender"
>
<
Fields
>
<
telerik:RadDataPagerTemplatePageField
HorizontalPosition
=
"LeftFloat"
>
<
PagerTemplate
>
<
div
style
=
"float: right;color:#666666;"
>
Displaying items
<
asp:Label
runat
=
"server"
ID
=
"PageItemFromLabel"
/>
to
<
asp:Label
runat
=
"server"
ID
=
"PageItemToLabel"
/>
of
<
asp:Label
runat
=
"server"
ID
=
"TotalItemsLabel"
/>
</
div
>
</
PagerTemplate
>
</
telerik:RadDataPagerTemplatePageField
>
<
telerik:RadDataPagerButtonField
FieldType
=
"NextLast"
HorizontalPosition
=
"RightFloat"
/>
<
telerik:RadDataPagerButtonField
FieldType
=
"Numeric"
HorizontalPosition
=
"RightFloat"
/>
<
telerik:RadDataPagerButtonField
FieldType
=
"FirstPrev"
HorizontalPosition
=
"RightFloat"
/>
</
Fields
>
</
telerik:RadDataPager
>