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. DataTable.GetChanges return null

DataTable.GetChanges return null

Scheduled Pinned Locked Moved C#
csshelp
1 Posts 1 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.
  • A Offline
    A Offline
    Alomgir Miah
    wrote on last edited by
    #1

    Hi, I have a DataGrid bound to a DataTable. I used the following code to bind the DataTable, // //Set the datasource of the Grid // this.dataGridPCUD.DataSource = this.dataTable; There is a save button that user clicks to save the information. The problem is that when the user makes changes and clicks Save, the information from the last cell of the GRID is not seen by the DataTable. I used the following code to get the changes CurrencyManager currencyManager = (CurrencyManager) this.dataGridPCUD.BindingContext[this.dataTable]; if (currencyManager != null) { currencyManager.EndCurrentEdit(); currencyManager. Refresh(); } DataTable subDataTable = this.dataTable.GetChanges(DataRowState.Modified); The heilighted line returns null. But when I check the new value in the DataTable, I see the modifies value. Everything works fine if the uses tabs out before saving. Please advise. Thanks and Regards, Alomgir Miah

    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