A question for all those who struggle with automatically databoundcontrols

P

Phil H

Dear All

On reading of the problems people are complaining about with such
controls as GridView, FormView etc I wonder whether they have
considered that maybe, just maybe, they have simply made the wrong
choice!

The above mentioned controls are at their best when they minimise the
amount of code required for editing, inserting and deleting data.
Fine! I have no hestation in using them myself when their default
behaviour fits the bill. But I have to question this when it becomes
necessary to write reams of code in the event handlers to twist the
normal behaviour and make them do what is actually required.

These controls are cleverly designed to save time and effort and all
credit to their designers, but anyone engaging in development work
must also understand that they are not the last word on the subject.
It is quite possible (and not all that complicated) to use ordinary
stand alone controls (for single record data forms) or DataList and
Repeater controls (for rendering multiple records). Even these latter
controls can be emulated with a table control and iteration with
DataReaders if necessary.

Just a thought. Comments welcome.
 
N

Nathan Sokalski

I have to agree with you. I once tried to adjust the FormView to look and
act as I wanted, and it just drove me crazy. I just stuck to the technique
of having complete control by using individual controls. The same normally
goes for GridView. Unless you are simply displaying the data from a database
and don't need any formatting, the GridView is rather hard to style. It may
be referred to as the powerhorse of ASP.NET 2.0, but I think that until it
has one more feature, it is just a pain. I would like it to be scrollable
instead of paging. I once needed a multi-column scrolling list, and I had to
end up placing a DataList inside a Panel. I still never finished perfecting
it, although I have ideas on what I could do. However, it would be very nice
to have something to generate this (To be honest, I think HTML should have a
multi-column listbox, but they don't). I am thinking about writing a custom
control that does this when I have time. But back to GridView vs DataList, I
also prefer DataList because it is easier to specify CommandArguments for
Buttons (CommandArgument is not a property of ButtonField, you need to use a
TemplateField with a Button inside it). But before I drive everyone into
boredom, I will just say Thank You For Finally Letting The Truth Be Known!
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top