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. General Programming
  3. C#
  4. DataSet: no MoveNext or any indexing at all

DataSet: no MoveNext or any indexing at all

Scheduled Pinned Locked Moved C#
questiondatabasehelp
3 Posts 2 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    i send a RowData object from a DataSet (dataset.getTable().Rows[x]) to a form that then displays that row in unbound controls. That form has a navigate forward and back button. how do i find out the row's index in a dataset so that i may 'movenext' or even iterate from that point? the problem is that the form does not know the row index and it cannot call back to the owner form. burnt:confused:

    J 1 Reply Last reply
    0
    • L Lost User

      i send a RowData object from a DataSet (dataset.getTable().Rows[x]) to a form that then displays that row in unbound controls. That form has a navigate forward and back button. how do i find out the row's index in a dataset so that i may 'movenext' or even iterate from that point? the problem is that the form does not know the row index and it cannot call back to the owner form. burnt:confused:

      J Offline
      J Offline
      James T Johnson
      wrote on last edited by
      #2

      You'll have to somehow pass the row index to the child form. I would work with the DataTable object in the child form, then you could do your iteration through that, as well as add new rows to the table. You can get the DataTable object from the DataRow object by the DataRow's Table property. James Simplicity Rules!

      L 1 Reply Last reply
      0
      • J James T Johnson

        You'll have to somehow pass the row index to the child form. I would work with the DataTable object in the child form, then you could do your iteration through that, as well as add new rows to the table. You can get the DataTable object from the DataRow object by the DataRow's Table property. James Simplicity Rules!

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        but i dont have the index and can not change the api i am using. the question is, and remains, how do i get the index of a row in a dataset given a DataRow object, and a DataSet object, and NOT the index of the current RowData object. if i can say dataset.Table().rows[20] and get a DataRow object, shouldnt i be able to easily code dataset.Table().rows[_row.rowID + 1] ? the rowID property shows up in the watch window, but why is private? how do i get to it?

        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