GridviewRow row = gridview.BottomPagerRow ......获取Null [英] GridviewRow row = gridview.BottomPagerRow......getting Null

查看:107
本文介绍了GridviewRow row = gridview.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.

In code behind, I am finding the placeholder as:

GridViewRow row = grdview.BottomPagerRow; ph1 = (PlaceHolder)row.FindControl("ph1");

但是 BottomPagerRow 的值始终为 Null 。我从最近3个小时用谷歌搜索过,找不到任何解决方案。请帮忙..







更正了格式和/或语法问题。

已添加 pre 标签。

[/编辑]

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



Corrected formatting and/or grammatical issues.
Added pre tags.
[/Edit]

推荐答案

BottomPagerRow属性仅可用在GridView控件在RowCreated事件中创建底部分页器行之后。尝试像DataBound这样的事件,在那里你可以找到BottomPagerRow里面的控件



http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.bottompagerrow (v = vs.110).aspx [ ^ ]
The BottomPagerRow property is available only after the GridView control creates the bottom pager row in the RowCreated event. Try an event like DataBound, where you can find the controls inside BottomPagerRow

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.bottompagerrow(v=vs.110).aspx[^]


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

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