Click here to Skip to main content
12,999,081 members (48,881 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi All,

I am creating some Custom Paging for my GridView , for that I have used PagerTemplate and inside PagerTemplate I have some Placeholder as Ph1, and in code behind, I am finding the placeholder as:
GridViewRow row = grdview.BottomPagerRow;
ph1 = (PlaceHolder)row.FindControl("ph1");

But the value for BottomPagerRow is always getting Null .
I have been googled from last 3 hours and will not find any solution .

Please help ..
Posted 28-Mar-13 21:10pm
Updated 10-Jun-16 1:18am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

1. check if grdview is populated with data, if not, bottompagerrow stays null.
2. make the type of row: GridViewPagerRow:
GridViewPagerRow row = grdview.BottomPagerRow;
ph1 = (PlaceHolder)row.FindControl("ph1");

even better would be to user
GridViewPagerRow row = (GridViewPagerRow)grdview.BottomPagerRow;

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170622.1 | Last Updated 10 Jun 2016
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100