What exactly is appropriate use? Both the Gridview ahd DetailsView controls
have databinding to some extend. I can program against the datasource
property without ever using another abstraction
I can extract data from Gridview control programmaticall y with no problem at
all why not the Detailsview? You talk about improper use but give no
evidence to support your claims.
In fact, tell my what possible purpose would the detailsview control
possibly have without the use of a datasource control. It seems unatural to
me. The second item is that you are forcing me into programming
declaratively which is not what I do. I want to retain some level of
control why tease me with read part of the process and give me no simple
alternative to the write part of the process.
The point is quite mute and purely academic for my part. What I have done
is create a custom control which can mimic both what the detailsview and
formsview controls do and much more. I just was wondering if I had missed
something and thus the question.
BTW - I do not believe you are entire correct, I seen some very ugly
implementations that allow what I am talking about. Including my new custom
control.
Getting back to Appropriate use, where is it specified how these controls
are to be used? In light of what I see nothing there in the control suggest
your position so I am curious how you arrived at your opinion.--
aaa
"Phil H" wrote:
On 7 Dec, 17:08, Angel <rodoo...@hotma il.comwrote:
I seem to understand how the control works as long as I mated to
SqlDataSource or ObjDataSource it works fine. But I do not want to flatten
my design in this manner. I am interested in how I can programmaticall y
manipulate the control. In other words maybe just use the data source then
extract from the control the information do with it as I see fit. The
opposite is also true. I want to be able to add or modify the data in the
detailsview control without the assistance of a SqlDatasource.
Has anyone done this? I have google this to death to no avail.
Thanks,
--
aaa
Why use a detailsview control for this?
If you only want to display one record (or row) of the datasource at
one time and retain the flexibility to do what you like then why not
use ordinary standalone web server controls with databinding where
appropriate? You'll have much more control of what happens when.
Furthermore if you want it to be re-usable then consider a
encapsulating it in a web user control.
This is a classic case of what I was talking about on another thread
where I posed the question about the inappropriate use of certain
databound controls (e.g. FormView, GridView etc) where the normal
behaviour doesn't meet the needs of the developer.