DetailsView With no Record

  • Thread starter Thread starter hon123456
  • Start date Start date
H

hon123456

Dear all,

I have setup a DetailsView with sqlDataSource. But the
DetailsView will be visible only where there is a record. What I want
is to show the Detailsview first which can add a new record
.. That means I want the Detailsview with New Hyper Link when it first
Starts. How can I do that?

Thanks.
 
Hi,

After binding the data, or by hooking to the "DataBound" event of the
Details view (must be something like that, not 100% sure though), you can
see if the DetailsView has any data item assigned to it. If not, you can
switch it to "New record" mode programmatically.
 
Back
Top