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. How to get the row number from a detail view [modified]

How to get the row number from a detail view [modified]

Scheduled Pinned Locked Moved C#
databasealgorithmstutorial
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.
  • G Offline
    G Offline
    gmhanna
    wrote on last edited by
    #1

    Hi, I'm trying to obtain the row number yet I haven't been able to figure out how. I have tried this:

    x = reunionBindingSource.Position;

    However, since I have already done this:

    this.reunionBindingSource.Sort = "LastName";

    the position does not equal the row number. I know I can save the position number, unsort it, grab the row number from position, resort it, and set the position. I could also build a dictionary before sorting it using the database key as the dictionary key, but there has to be a better way. Thank you,

    Glenn

    modified on Thursday, May 13, 2010 1:01 PM

    A 1 Reply Last reply
    0
    • G gmhanna

      Hi, I'm trying to obtain the row number yet I haven't been able to figure out how. I have tried this:

      x = reunionBindingSource.Position;

      However, since I have already done this:

      this.reunionBindingSource.Sort = "LastName";

      the position does not equal the row number. I know I can save the position number, unsort it, grab the row number from position, resort it, and set the position. I could also build a dictionary before sorting it using the database key as the dictionary key, but there has to be a better way. Thank you,

      Glenn

      modified on Thursday, May 13, 2010 1:01 PM

      A Offline
      A Offline
      Abhinav S
      wrote on last edited by
      #2

      Sorry - but not sure what a non-grid view is...

      G 1 Reply Last reply
      0
      • A Abhinav S

        Sorry - but not sure what a non-grid view is...

        G Offline
        G Offline
        gmhanna
        wrote on last edited by
        #3

        What I mean from a non-grid view is a detail view, where the controls are individual controls on a form instead of a grid view. Thank you,

        Glenn

        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