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. Database & SysAdmin
  3. Database
  4. getting next row data into focus

getting next row data into focus

Scheduled Pinned Locked Moved Database
csharpdatabasehelptutorialquestion
5 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.
  • G Offline
    G Offline
    Glen Harvy 0
    wrote on last edited by
    #1

    I have created a windows form using C# / ADO.Net that contains textboxes that are populated at initialisation with the contents of the first row of a dataset - works well. I don't specify the actual row because the SELECT query returns the rows in the desired order. What I want to do is have a "next" button on that form populate the textboxes with data from the next row. 1. Can I just execute some onClick code to do this easily and if so where can I locate an example code? 2. I'm just learning ADO.Net as well as C# and would appreciate pointers to where I can find some good tutorilas on the net to help me particularly with database access/manipulation. TIA. Glen Harvy

    D M 2 Replies Last reply
    0
    • G Glen Harvy 0

      I have created a windows form using C# / ADO.Net that contains textboxes that are populated at initialisation with the contents of the first row of a dataset - works well. I don't specify the actual row because the SELECT query returns the rows in the desired order. What I want to do is have a "next" button on that form populate the textboxes with data from the next row. 1. Can I just execute some onClick code to do this easily and if so where can I locate an example code? 2. I'm just learning ADO.Net as well as C# and would appreciate pointers to where I can find some good tutorilas on the net to help me particularly with database access/manipulation. TIA. Glen Harvy

      D Offline
      D Offline
      DIMPLE_R
      wrote on last edited by
      #2

      Hi Glen, You may want to check this link http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbwlkwalkthroughdisplayingdatainwindowsformusingparameterizedquery.asp Hope it helps --Dimple

      G 1 Reply Last reply
      0
      • D DIMPLE_R

        Hi Glen, You may want to check this link http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbwlkwalkthroughdisplayingdatainwindowsformusingparameterizedquery.asp Hope it helps --Dimple

        G Offline
        G Offline
        Glen Harvy 0
        wrote on last edited by
        #3

        Thanks for the reference. It's close enough for me to learn from :) Glen Harvy

        1 Reply Last reply
        0
        • G Glen Harvy 0

          I have created a windows form using C# / ADO.Net that contains textboxes that are populated at initialisation with the contents of the first row of a dataset - works well. I don't specify the actual row because the SELECT query returns the rows in the desired order. What I want to do is have a "next" button on that form populate the textboxes with data from the next row. 1. Can I just execute some onClick code to do this easily and if so where can I locate an example code? 2. I'm just learning ADO.Net as well as C# and would appreciate pointers to where I can find some good tutorilas on the net to help me particularly with database access/manipulation. TIA. Glen Harvy

          M Offline
          M Offline
          Mike Osbahr
          wrote on last edited by
          #4

          If you are using the Visual Studio IDE, there is a template form for data. The wizard will ask if you want to display one record or multiple records. Selecting one record will generate a form that has the text boxes for editing data values as well as the navigation controls. The code generated should be very similar to the example you've already seen. For a simple application it might be close to what you need without all the cut & paste. >>>-----> MikeO

          G 1 Reply Last reply
          0
          • M Mike Osbahr

            If you are using the Visual Studio IDE, there is a template form for data. The wizard will ask if you want to display one record or multiple records. Selecting one record will generate a form that has the text boxes for editing data values as well as the navigation controls. The code generated should be very similar to the example you've already seen. For a simple application it might be close to what you need without all the cut & paste. >>>-----> MikeO

            G Offline
            G Offline
            Glen Harvy 0
            wrote on last edited by
            #5

            Mike Osbahr wrote:

            If you are using the Visual Studio IDE

            I am. Thank you for this - I'm learning the IDE as well so you've helped with two areas that I need development on :-D Glen Harvy

            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