开发者

How can I change an asp datapager's Pager.PagedControlID property at runtime?

This property was originally set in the asp开发者_Python百科x file, however I want to change it to select programatically on page load.

I set the Pager.PagedControlID property, but I receive the following error message on this line:

Pager.PageSize = Convert.ToInt32(ListLength);

Page properties cannot be set because no IPageableItemContainer has been found.

Any ideas? The ID I am using I copied and pasted out of the inline aspx and I checked it is correct.


DataPager can work only with controls that implement IPageableItemContainer interface. If your control (that you wish to page) does not implement this property then you probably need to write a wrapper control that implements the interface.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜