Hello, I use a the RadDataPager in multiple places throughout my project. I have many properties set in a specific fashion, and I find myself having to copy/paste the pager all over.
Is there a way to set up a skin or a default style or a control for the pager so that the options can be set in one place only?
Below is my code for the pager. I even end up duplicating it on each single page due to the fact that I show the pager on the top and on the bottom of the page.
Thanks!
Is there a way to set up a skin or a default style or a control for the pager so that the options can be set in one place only?
Below is my code for the pager. I even end up duplicating it on each single page due to the fact that I show the pager on the top and on the bottom of the page.
Thanks!
<
telerik:RadDataPager
ID
=
"RadDataPagerBottom"
runat
=
"server"
IsTotalItemCountFixed
=
"True"
Skin
=
"Windows7"
Width
=
"730px"
CssClass
=
"Custom"
>
<
Fields
>
<
telerik:RadDataPagerButtonField
FieldType
=
"FirstPrev"
/>
<
telerik:RadDataPagerButtonField
FieldType
=
"Numeric"
/>
<
telerik:RadDataPagerButtonField
FieldType
=
"NextLast"
/>
<
telerik:RadDataPagerTemplatePageField
HorizontalPosition
=
"RightFloat"
>
<
PagerTemplate
>
<
div
style
=
"float: right;color:#666666;"
>
Displaying items <
asp:Label
runat
=
"server"
ID
=
"CurrentPageLabel"
Text="<%# Container.Owner.StartRowIndex + 1 %>" />
to
<
asp:Label
runat
=
"server"
ID
=
"TotalPagesLabel"
Text="<%# (Container.Owner.TotalRowCount < Container.Owner.StartRowIndex + Container.Owner.PageSize)?Container.Owner.TotalRowCount:Container.Owner.StartRowIndex + Container.Owner.PageSize %>" />
of
<
asp:Label
runat
=
"server"
ID
=
"TotalItemsLabel"
Text="<%# Container.Owner.TotalRowCount %>" />
</
div
>
</
PagerTemplate
>
</
telerik:RadDataPagerTemplatePageField
>
</
Fields
>
</
telerik:RadDataPager
>