C# Gridview底部页面箭头未找到
我在GridView的PagerTemplate中放置了一个ASP DataRepeater。我需要在我的代码中找到DataRepeater 我正在试这个C# Gridview底部页面箭头未找到,c#,asp.net,gridview,custompaging,C#,Asp.net,Gridview,Custompaging,我在GridView的PagerTemplate中放置了一个ASP DataRepeater。我需要在我的代码中找到DataRepeater 我正在试这个 Repeater rptPager = (Repeater)gv_Inbox.BottomPagerRow.FindControl("rptPager"); 但这是一个例外 Object reference not set to an instance of an object. 当我尝试 GridViewRow row = gv_Inb
Repeater rptPager = (Repeater)gv_Inbox.BottomPagerRow.FindControl("rptPager");
但这是一个例外
Object reference not set to an instance of an object.
当我尝试
GridViewRow row = gv_Inbox.BottomPagerRow;
它返回Null
我正在GridView中尝试自定义分页。这样我就可以将中继器放在GridView下面并使用分页。但我想把中继器放在GridView的底部,即寻呼机行。那么我该怎么做呢 你能帮我吗 BottomPagerRow属性仅在GridView之后可用 控件在RowCreated事件中创建底部寻呼机行 尝试像DataBound这样的事件,您可以在BottomPageRow中找到控件将以下行添加到“RowDataBound” 然后你就可以进入了
If e.Row.RowType <> DataControlRowType.Pager Then Exit Sub
如果e.Row.RowType数据控制RowType.Pager,则退出Sub
您尝试查找BottomPageRow的哪个事件?我正在GridView中尝试自定义分页。这样我就可以将中继器放在GridView下面并使用分页。但我想把中继器放在GridView的底部,即寻呼机行。那么我该怎么做呢?我把我的代码放在GridView_RowDatabound中,它现在正在工作。但问题是PagerRow没有显示gridview的Reduce PageSize属性,如果您有5条记录,您需要将PageSize设置为小于5的值,那么只有PageRow可见