Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. DetailsView -> getting immediately into insert/edit mode when page loads

DetailsView -> getting immediately into insert/edit mode when page loads

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasequestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Desmond Lim
    wrote on last edited by
    #1

    Hi guys, I'm wondering of these are possible: 1) I have a asp.net page that has a DetailsView in it. When the page loads it would load the 1st record in the database (which is fine). I have also "activated" the new (insert) button. Is there a way for asp.net to auto activate the new? I mean, when the page loads, can it be in the "insert" mode immediately instead of the details display mode? 2) Also, is it possible to allow the user to select a record from a GridView and then have the page redirect to another page where it is in edit mode? i.e. upon clicking select in GridView, another page is open where it is in edit mode for that record selected? If not, is there another way of doing this? Like creating a edit page where the user has to enter the record s/n they want to edit and have the DetailsView brought up in edit mode? Thanks. Desmond

    V W 2 Replies Last reply
    0
    • D Desmond Lim

      Hi guys, I'm wondering of these are possible: 1) I have a asp.net page that has a DetailsView in it. When the page loads it would load the 1st record in the database (which is fine). I have also "activated" the new (insert) button. Is there a way for asp.net to auto activate the new? I mean, when the page loads, can it be in the "insert" mode immediately instead of the details display mode? 2) Also, is it possible to allow the user to select a record from a GridView and then have the page redirect to another page where it is in edit mode? i.e. upon clicking select in GridView, another page is open where it is in edit mode for that record selected? If not, is there another way of doing this? Like creating a edit page where the user has to enter the record s/n they want to edit and have the DetailsView brought up in edit mode? Thanks. Desmond

      V Offline
      V Offline
      Venkatesh Mookkan
      wrote on last edited by
      #2

      Check this url[^]. This would help you.

      [Venkatesh Mookkan] My: Website | Yahoo Group | Blog Spot

      1 Reply Last reply
      0
      • D Desmond Lim

        Hi guys, I'm wondering of these are possible: 1) I have a asp.net page that has a DetailsView in it. When the page loads it would load the 1st record in the database (which is fine). I have also "activated" the new (insert) button. Is there a way for asp.net to auto activate the new? I mean, when the page loads, can it be in the "insert" mode immediately instead of the details display mode? 2) Also, is it possible to allow the user to select a record from a GridView and then have the page redirect to another page where it is in edit mode? i.e. upon clicking select in GridView, another page is open where it is in edit mode for that record selected? If not, is there another way of doing this? Like creating a edit page where the user has to enter the record s/n they want to edit and have the DetailsView brought up in edit mode? Thanks. Desmond

        W Offline
        W Offline
        Wasif Ehsan
        wrote on last edited by
        #3

        1. Set the default mode of the detailview to 'Insert'. 2. Yes its possible by manipulating any appropriate event like OnItemCommand.

        D 1 Reply Last reply
        0
        • W Wasif Ehsan

          1. Set the default mode of the detailview to 'Insert'. 2. Yes its possible by manipulating any appropriate event like OnItemCommand.

          D Offline
          D Offline
          Desmond Lim
          wrote on last edited by
          #4

          Wasif Ehsan wrote:

          1. Set the default mode of the detailview to 'Insert'. 2. Yes its possible by manipulating any appropriate event like OnItemCommand.

          Thanks a million. 1 works now. but I have no idea how to go about doing 2. Do you have an example or something that I can read? Thanks. Desmond

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups