This project is read-only.

Paging in a widget

Topics: General, Writing modules
Aug 8, 2012 at 12:35 PM

I have created a widget to display information I receive from a web service - works great, but can I add paging to a widget?

I have added paging to a custom module before, but not with a widget - I can't seem to figure out how to padd the PageParameters to the Widget



Aug 8, 2012 at 5:35 PM

PagerParameters are instantiated by the modelbinder, and its properties are set to the values of the querystring parameters Page and PageSize.
In case of a widget, in the driver, you could read the querystring using the HttpContext.Request.QueryString object (use IWorkContextAccessor to get the current HttpContext) and then instantiate a PageParameters object yourself.


Aug 9, 2012 at 9:58 AM

Excellent - that did the trick.