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. Visual Basic
  4. last line in data grid not updating

last line in data grid not updating

Scheduled Pinned Locked Moved Visual Basic
cssquestion
3 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.
  • K Offline
    K Offline
    kowplunk
    wrote on last edited by
    #1

    I am having a hard time getting the getChanges to retrieve the changes that were performed on the last row of the data, since nothing really happens when the hit the enter key on the last line (it doesn't go to the next line since there isn't one. Has anyone found a way around this?

    U 1 Reply Last reply
    0
    • K kowplunk

      I am having a hard time getting the getChanges to retrieve the changes that were performed on the last row of the data, since nothing really happens when the hit the enter key on the last line (it doesn't go to the next line since there isn't one. Has anyone found a way around this?

      U Offline
      U Offline
      User 530381
      wrote on last edited by
      #2

      why don't you just try writing a line of code like this one Me.BindingContext(Me.Dataset11, "authors").Position += 1 just before you call the GetChanges() method it will most probably work ;) sony speed

      J 1 Reply Last reply
      0
      • U User 530381

        why don't you just try writing a line of code like this one Me.BindingContext(Me.Dataset11, "authors").Position += 1 just before you call the GetChanges() method it will most probably work ;) sony speed

        J Offline
        J Offline
        Jim Matthews
        wrote on last edited by
        #3

        this does work in most scenarios, but i've had problems with doing it this way. say for instance you only have one row displayed in the datagrid? you can't change the position and therefore the data doesn't get saved. the proper way of handling this situation is manually calling EndEdit() for the datagrid, or the underlying datasource. hope this helps.


        -jim

        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