DetailsView With no Record

Discussion in 'ASP .Net' started by hon123456, Jul 24, 2009.

  1. hon123456

    hon123456 Guest

    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.
    hon123456, Jul 24, 2009
    #1
    1. Advertising

  2. 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.



    --
    Coskun Sunali
    Microsoft MVP - ASP.NET
    http://sunali.com
    http://propeople.dk

    "hon123456" <> wrote in message
    news:...
    > 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.
    Coskun Sunali [MVP], Jul 24, 2009
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?VGRhclRkYXI=?=

    Detailsview adding first record

    =?Utf-8?B?VGRhclRkYXI=?=, Sep 11, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    4,713
    =?Utf-8?B?VGRhclRkYXI=?=
    Sep 12, 2005
  2. Nick
    Replies:
    0
    Views:
    508
  3. Giorgio
    Replies:
    1
    Views:
    3,473
    purkka
    Mar 15, 2006
  4. Frits van Soldt

    How to insert a new record in detailsview when there are no record

    Frits van Soldt, Nov 16, 2005, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    720
    Frits van Soldt
    Nov 17, 2005
  5. Feege
    Replies:
    0
    Views:
    431
    Feege
    Dec 20, 2005
Loading...

Share This Page