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. Need a way to jump to record.

Need a way to jump to record.

Scheduled Pinned Locked Moved Database
databasecsharpwpfwcfhelp
7 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.
  • P Offline
    P Offline
    PyroManiak
    wrote on last edited by
    #1

    I'm trying to force a window to jump to a specific row in my database when I click a button. I'm using a "details" display of the table, and there is a binding navigator(supplied with the drag and drop creation of the form). An example would be (I'm using c# btw) [Parts list] 1. 2. 3. ... Select Part [2.] New Form with more details on part 2. Edit/Delete/New part I can use a modified SQL query to return just the one row, but then the add/delete/new buttons dont work because the mapping is lost to the original data. I can't imagine this is something hard to do, but I've been all over the net posting for an answer and nobody has even attempted. Any help is appreciated.

    P 1 Reply Last reply
    0
    • P PyroManiak

      I'm trying to force a window to jump to a specific row in my database when I click a button. I'm using a "details" display of the table, and there is a binding navigator(supplied with the drag and drop creation of the form). An example would be (I'm using c# btw) [Parts list] 1. 2. 3. ... Select Part [2.] New Form with more details on part 2. Edit/Delete/New part I can use a modified SQL query to return just the one row, but then the add/delete/new buttons dont work because the mapping is lost to the original data. I can't imagine this is something hard to do, but I've been all over the net posting for an answer and nobody has even attempted. Any help is appreciated.

      P Offline
      P Offline
      PyroManiak
      wrote on last edited by
      #2

      I found this article here[^] I've tried to follow because that sounds like my problem, so my code looks like this. this.tbAdapter.fill(dataSet.tb); this.dataSet.tb.select(); that still gives me record 1, instead of the one I want. What am I doing wrong? -- modified at 16:41 Tuesday 27th June, 2006

      A 1 Reply Last reply
      0
      • P PyroManiak

        I found this article here[^] I've tried to follow because that sounds like my problem, so my code looks like this. this.tbAdapter.fill(dataSet.tb); this.dataSet.tb.select(); that still gives me record 1, instead of the one I want. What am I doing wrong? -- modified at 16:41 Tuesday 27th June, 2006

        A Offline
        A Offline
        Alexander Wiseman
        wrote on last edited by
        #3

        Hello again PyroManiak, I took a quick look at the code in the link you gave, and I noticed that the poster in that message was using the IndexOf function, which he said was returning -1. The way I understood his reply post with the answer was that he called select but then called IndexOf after that. This is just speculation, since I haven't tested it yet, but I wanted to ask you if you were calling IndexOf? If you are and it still doesn't work, could you post the rest of your code to do with loading the "edit" form? Hope that helps. Sincerely, Alexander Wiseman

        P 1 Reply Last reply
        0
        • A Alexander Wiseman

          Hello again PyroManiak, I took a quick look at the code in the link you gave, and I noticed that the poster in that message was using the IndexOf function, which he said was returning -1. The way I understood his reply post with the answer was that he called select but then called IndexOf after that. This is just speculation, since I haven't tested it yet, but I wanted to ask you if you were calling IndexOf? If you are and it still doesn't work, could you post the rest of your code to do with loading the "edit" form? Hope that helps. Sincerely, Alexander Wiseman

          P Offline
          P Offline
          PyroManiak
          wrote on last edited by
          #4

          I think I've got a solution. It seems to work without problem. myBindingSource.Position = variable; -- modified at 19:11 Tuesday 27th June, 2006 My older post got answered in a rather rude way, thanks for not treating me like an idiot.

          P C 2 Replies Last reply
          0
          • P PyroManiak

            I think I've got a solution. It seems to work without problem. myBindingSource.Position = variable; -- modified at 19:11 Tuesday 27th June, 2006 My older post got answered in a rather rude way, thanks for not treating me like an idiot.

            P Offline
            P Offline
            PyroManiak
            wrote on last edited by
            #5

            Don't suppose you know how to capture a single attribute from a row in a datagridview do you? -- modified at 19:57 Tuesday 27th June, 2006 I'm trying things like datagridview.rows.indexof(); but it says I must give it a variable, well, if I had the variable I wouldn't need it to tell me! =P

            1 Reply Last reply
            0
            • P PyroManiak

              I think I've got a solution. It seems to work without problem. myBindingSource.Position = variable; -- modified at 19:11 Tuesday 27th June, 2006 My older post got answered in a rather rude way, thanks for not treating me like an idiot.

              C Offline
              C Offline
              Colin Angus Mackay
              wrote on last edited by
              #6

              PyroManiak wrote:

              My older post got answered in a rather rude way, thanks for not treating me like an idiot.

              I wasn't being rude. I mistook that initial vagueness of your initial post as betraying a level of understanding below that which you had. If you thought it rude of me to suggest buying a book on that assumption then there isn't much more I can do.


              Scottish Developers events: * .NET debugging, tracing and instrumentation by Duncan Edwards Jones and Code Coverage in .NET by Craig Murphy * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog

              P 1 Reply Last reply
              0
              • C Colin Angus Mackay

                PyroManiak wrote:

                My older post got answered in a rather rude way, thanks for not treating me like an idiot.

                I wasn't being rude. I mistook that initial vagueness of your initial post as betraying a level of understanding below that which you had. If you thought it rude of me to suggest buying a book on that assumption then there isn't much more I can do.


                Scottish Developers events: * .NET debugging, tracing and instrumentation by Duncan Edwards Jones and Code Coverage in .NET by Craig Murphy * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog

                P Offline
                P Offline
                PyroManiak
                wrote on last edited by
                #7

                I'm sorry, its probably just me. It is the end of the quarter and this project was dumped in my lap as a last minute deal and it wasn't planned out other then some oddball requirements. As far as a book goes, I'm been waiting to get a book on ADO.net 2.0 (Pro ADO.NET 2.0 - Sahil Malik) but they wont budget anything else until next month when the new quarter kicks in. This is what happens when people find out a hardware engineer also has background in software development.

                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