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

Shared Custom PagerTemplate

3 Answers 60 Views
Grid
This is a migrated thread and some comments may be shown as answers.
JOHN STRUCHYNSKI
Top achievements
Rank 1
JOHN STRUCHYNSKI asked on 29 Sep 2008, 02:08 PM
Hi,

I am using the customized PagerTemplate demonstrated here for all my grids. Is there a way to create a webusercontrol (ascx) or a class than can be shared instead of having to manually type the <PagerTemplate></PagerTemplate> for every grid that uses the special pager template? It makes the most sense to define the template once and then let multiple grids using it.
IE:
<PagerTemplate><uc1:CustomPager ID="CustomPager1" runat="server"></PagerTemplate>

or in codebeind
radGrid1.MasterTableView.PagerTemplate = myPagerClass();

Thank you!

3 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 01 Oct 2008, 12:02 PM
Hi John,

Please find attached a simple web site, which demonstrates how to implement a reusable user control inside a RadGrid pager template.

Kind regards,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
JOHN STRUCHYNSKI
Top achievements
Rank 1
answered on 06 Oct 2008, 03:51 PM
Thank you!
0
Levi
Top achievements
Rank 1
answered on 07 Nov 2008, 02:57 PM
Man this is just what I was looking for. I tried doing this myself and failed, but realized it was because I was putting the PagerTemplate nodes inside the user control itself. You should really consider putting this in your samples section, because the one in there uses javascript which gets messy when your using user controls. Thanks again for this!
Tags
Grid
Asked by
JOHN STRUCHYNSKI
Top achievements
Rank 1
Answers by
Dimo
Telerik team
JOHN STRUCHYNSKI
Top achievements
Rank 1
Levi
Top achievements
Rank 1
Share this question
or