asp.netvb.netpaginationasp.net-3.5

PagedDataSource.AllowPaging - Default value is False?


From what I can tell, the main purpose of a PagedDataSource is to allow paging of a datasource before being bound to a server control.

If this is the main purpose of this control, why is the AllowPaging attribute's default value False?

I'm only asking as often I will forget to set this as True causing confusion when it doesn't work.


Solution

  • Because AllowPaging is set to False in the PagedDataSource constructor. It's just the standard, I'm not arguing that it's good or bad, it's just how it is.

    You could just set the value to "True" in your code, which you will inevitably end up copying-pasting for the next time you need it. Problem solved!

    Reference