Programmatic GridView

G

Guest

So far all the examples I've seen on the GridView gets its data declaratively
using one of the Data Source controls such as the ObjectDataSource.

Are there any good articles on using the GridView programmatically, getting
data from a business tier, and implementing sorting and paging on that data.
All of that without one of the Data Source controls?
 
M

multiformity

I wrote my own grid control that does all of this starting a few years
back. It's all part of an opensource project I am working on. But if I
understand your question, you want to automatically display data based
off of the underlying structure of the table in your DB, or perhaps a
middle logic layer.

I have done this before in an opensource project that me and a few
friends are working on.

Open Source Project home
http://www.codeproject.com/aspnet/RapidWebAppDev.asp

Site that was developed using the project:
http://www.ats-engineers.com
(I am currently working on a demo site at the same domain that will
demo the features that the general public does not have access to)

Again, what you want is possible with my opensource project, and even
if you don't use it, it may get you started in the right direction. The
biggest problem I had with the datagrid (1.0-1.1) and the datagridview
is that things like filtering and column captions, as well as which
columns were even displayed were all very problematic to code from
actual code, rather than ASPX page markups. These ASPX Markups are nice
for one off pages, but not something that you want to use if you want
something to be re-usable. The Multiformity project stores quite a bit
of metadata about the database in its System Tables (all preceded by an
underscore). Things like if a table is editable, readable, even if
fields are editable and readable. It also integrates a view concept (in
an unreleased version that I am still polishing off before publishing
it), as well as saved filters. Plus lots of other snazzy security
features, and builtin custom controls.

I don't know if this answers your question, but I know that I have yet
to come up on a good example of DataGridView that is not 100%
configured through the VS Designer and is pretty much useless for any
kind of re-usability. I for one understand your point, and don't want
to spend my life designing grid pages for 100 + tables in my
database...

Good luck!

AB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top