开发者

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

开发者 https://www.devze.com 2023-01-16 16:45 出处:网络
This property was originally set in the asp开发者_Python百科x file, however I want to change it to select programatically on page load.

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

精彩评论

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