Usually when you design a page, you are the one that has to decide what a
data table will look like, but what if you want to give your users some options?
This neat little sample script allows users to select how many columns
the data table should have.
Whenever I convert one of our samples, I normally try and include all the features
of the classic ASP version. This time I'm breaking that tradition in order to keep
things simple. While I could easily have just converted the classic ASP version to
ASP.NET, doing so without using a data-bound control wouldn't have really reflected the
".NET way of doing things." Unfortunately, by making the decision to do things this way
we run into a problem -- adding paging to a DataList is non-trivial and is a little outside the scope of the sample.
So for now I'm leaving out the paging portion of the code in an effort not to confuse everyone.
I'm not sure how many of you are really interested in the paging, but if there's enough
demand for it, I'll provide an alternate version which doesn't
use the DataList control and is truer to the original sample.