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. DataGridView and DataSet

DataGridView and DataSet

Scheduled Pinned Locked Moved C#
helpdatabaseannouncement
10 Posts 4 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.
  • H Offline
    H Offline
    half life
    wrote on last edited by
    #1

    HI, i have a strange problem: i have a datagrid view bound to a table. when i edit a cell content i press a button to save this changes like this : TA_Users.Update(dS_StationManager.T_Users); dS_StationManager.T_Users.AcceptChanges(); THIS WORKS FINE. now i've decieded to removw the button so that the changes will be saved without the user pressing the button. i've tryied copying this two code lines TA_Users.Update(dS_StationManager.T_Users); dS_StationManager.T_Users.AcceptChanges(); to diff datagridview events like : 1. dgvUsers_Edit_CellValueChanged 2. dgvUsers_Edit_CellEndEdit but nothing happens, the database does'nt change Help Req THANKS :) :)

    Have Fun Never forget it

    E X J 3 Replies Last reply
    0
    • H half life

      HI, i have a strange problem: i have a datagrid view bound to a table. when i edit a cell content i press a button to save this changes like this : TA_Users.Update(dS_StationManager.T_Users); dS_StationManager.T_Users.AcceptChanges(); THIS WORKS FINE. now i've decieded to removw the button so that the changes will be saved without the user pressing the button. i've tryied copying this two code lines TA_Users.Update(dS_StationManager.T_Users); dS_StationManager.T_Users.AcceptChanges(); to diff datagridview events like : 1. dgvUsers_Edit_CellValueChanged 2. dgvUsers_Edit_CellEndEdit but nothing happens, the database does'nt change Help Req THANKS :) :)

      Have Fun Never forget it

      E Offline
      E Offline
      Expert Coming
      wrote on last edited by
      #2

      Are those events actually tied to the delegate?

      The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo

      H 1 Reply Last reply
      0
      • H half life

        HI, i have a strange problem: i have a datagrid view bound to a table. when i edit a cell content i press a button to save this changes like this : TA_Users.Update(dS_StationManager.T_Users); dS_StationManager.T_Users.AcceptChanges(); THIS WORKS FINE. now i've decieded to removw the button so that the changes will be saved without the user pressing the button. i've tryied copying this two code lines TA_Users.Update(dS_StationManager.T_Users); dS_StationManager.T_Users.AcceptChanges(); to diff datagridview events like : 1. dgvUsers_Edit_CellValueChanged 2. dgvUsers_Edit_CellEndEdit but nothing happens, the database does'nt change Help Req THANKS :) :)

        Have Fun Never forget it

        X Offline
        X Offline
        Xmen Real
        wrote on last edited by
        #3

        copy back to button and check if its still working

        TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L %^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2 W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN% Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i’TV.C\y<pŠjxsg-b$f4ia> -------------------------------------------------------- 128 bit encrypted signature, crack if you can

        H 1 Reply Last reply
        0
        • X Xmen Real

          copy back to button and check if its still working

          TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L %^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2 W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN% Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i’TV.C\y<pŠjxsg-b$f4ia> -------------------------------------------------------- 128 bit encrypted signature, crack if you can

          H Offline
          H Offline
          half life
          wrote on last edited by
          #4

          Xmen wrote:

          copy back to button and check if its still working

          what do u mean?? call the button callback form the event??

          Have Fun Never forget it

          X 1 Reply Last reply
          0
          • E Expert Coming

            Are those events actually tied to the delegate?

            The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo

            H Offline
            H Offline
            half life
            wrote on last edited by
            #5

            they occuer ( i debuged this ) if that waht u mean :)

            Have Fun Never forget it

            1 Reply Last reply
            0
            • H half life

              Xmen wrote:

              copy back to button and check if its still working

              what do u mean?? call the button callback form the event??

              Have Fun Never forget it

              X Offline
              X Offline
              Xmen Real
              wrote on last edited by
              #6

              I mean copy paste that code in a button and test that is it still working. It may possible that you change something and forgot...

              TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L %^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2 W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN% Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i’TV.C\y<pŠjxsg-b$f4ia> -------------------------------------------------------- 128 bit encrypted signature, crack if you can

              H 1 Reply Last reply
              0
              • X Xmen Real

                I mean copy paste that code in a button and test that is it still working. It may possible that you change something and forgot...

                TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L %^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2 W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN% Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i’TV.C\y<pŠjxsg-b$f4ia> -------------------------------------------------------- 128 bit encrypted signature, crack if you can

                H Offline
                H Offline
                half life
                wrote on last edited by
                #7

                yep stiil works i copied it to the tabpage selectedindex changed event and it works :(

                Have Fun Never forget it

                X 1 Reply Last reply
                0
                • H half life

                  HI, i have a strange problem: i have a datagrid view bound to a table. when i edit a cell content i press a button to save this changes like this : TA_Users.Update(dS_StationManager.T_Users); dS_StationManager.T_Users.AcceptChanges(); THIS WORKS FINE. now i've decieded to removw the button so that the changes will be saved without the user pressing the button. i've tryied copying this two code lines TA_Users.Update(dS_StationManager.T_Users); dS_StationManager.T_Users.AcceptChanges(); to diff datagridview events like : 1. dgvUsers_Edit_CellValueChanged 2. dgvUsers_Edit_CellEndEdit but nothing happens, the database does'nt change Help Req THANKS :) :)

                  Have Fun Never forget it

                  J Offline
                  J Offline
                  jaypatel512
                  wrote on last edited by
                  #8

                  Dont you think you need to try the event dgvUsers_SelectedIndexChanged. I have tried that in my code. It was working. Try to update the database after you leave that row . .

                  H 1 Reply Last reply
                  0
                  • J jaypatel512

                    Dont you think you need to try the event dgvUsers_SelectedIndexChanged. I have tried that in my code. It was working. Try to update the database after you leave that row . .

                    H Offline
                    H Offline
                    half life
                    wrote on last edited by
                    #9

                    thanks :) this was the first thing i thought about doing but decided not to update each time i leave a row but thanks anyway :)

                    Have Fun Never forget it

                    1 Reply Last reply
                    0
                    • H half life

                      yep stiil works i copied it to the tabpage selectedindex changed event and it works :(

                      Have Fun Never forget it

                      X Offline
                      X Offline
                      Xmen Real
                      wrote on last edited by
                      #10

                      half-life wrote:

                      i copied it to the tabpage selectedindex changed eventand it works

                      hehe nice place xD well try this one

                          void UpdateDataBase(object sender, EventArgs e)
                          {
                              // paste here that code
                          }
                      

                      and in CellValueChanged

                      this.Invoke(new EventHandler(UpdateDataBase));

                      TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L %^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2 W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN% Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i’TV.C\y<pŠjxsg-b$f4ia> -------------------------------------------------------- 128 bit encrypted signature, crack if you can

                      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