Fooling DataPager Control
-
Hi, I need to know how to fool a data pager. I have a grid which is bound to a List, and since I am not using object data source I need to manually manage the paging event for the grid. now my grid is paged using datapager control, and I have a scenario. when I do a paging event, I take the current page, and the pagesize to get the exact items to bind to the grid. using skip and take method, I managed the paging well. but the problem comes when I bind the paged rows the datapager does not work anymore, since its taking the data from the grid which only have the exact rows, it tends to render that it does not have a next/prev page. now I need to fool the datapager of the exact rows that I am paging or have a fix datapager fields. any suggestion would be great.
-
Hi, I need to know how to fool a data pager. I have a grid which is bound to a List, and since I am not using object data source I need to manually manage the paging event for the grid. now my grid is paged using datapager control, and I have a scenario. when I do a paging event, I take the current page, and the pagesize to get the exact items to bind to the grid. using skip and take method, I managed the paging well. but the problem comes when I bind the paged rows the datapager does not work anymore, since its taking the data from the grid which only have the exact rows, it tends to render that it does not have a next/prev page. now I need to fool the datapager of the exact rows that I am paging or have a fix datapager fields. any suggestion would be great.
Best bet is to write your own paging control, and perhaps use a repeater, so you have more control over what gets rendered.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Best bet is to write your own paging control, and perhaps use a repeater, so you have more control over what gets rendered.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
any other way?
-
any other way?
Anything else would be a hack, far more prone to bugs. The most obvious way, is to build a data source and bind to it, even if it doesn't come from a DB
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.