BottomPagerRow显示Null [英] BottomPagerRow is aways showing Null

查看:114
本文介绍了BottomPagerRow显示Null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我正在为我的GridView创建一些自定义分页,因为我使用了PagerTemplate并且在PagerTemplate中我有一些占位符作为Ph1,并且代码背后,我发现占位符为:

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");



BottomPagerRow 的值总是 Null

我从最近3个小时开始用谷歌搜索,无法找到任何解决方案。



请帮助..


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 ..

推荐答案

1。检查grdview是否填充了数据,如果没有,bottompagerrow保持为null。

2.制作行类型:GridViewPagerRow:

GridViewPagerRow row = grdview.BottomPagerRow;

ph1 =(PlaceHolder)row.FindControl(ph1);



更好的是用户

GridViewPagerRow row =(GridViewPagerRow)grdview.BottomPagerRow;
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;


这篇关于BottomPagerRow显示Null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆