|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Data Set Changes and Image importingHi!
I'm trying to check in the OnFormClosing event if the dataset has changes that are still not commited and if yes to display a dialog box showing a question if the user wants to save tha changes or not. I test it with dataset.HasChanges() but it returns true even only when i change the record with binding navigator... Does anybody know how to do this right?? Also how can i load a picture in the database and display it in a imagecontrol? Thanks!!! Radi,
if (((DataSet)employeesBindingSource.DataSource).HasChanges() ) { MessageBox.Show("There are changes"); if (northwindDataSet.HasChanges() ) { MessageBox.Show("There are changes"); Both work fine for me. I hope this helps, Cor Show quote "Radi Radichev" <radi.radic***@uni-jena.de> schreef in bericht news:OxqToSuLGHA.2628@TK2MSFTNGP15.phx.gbl... > Hi! > I'm trying to check in the OnFormClosing event if the dataset has changes > that are still not commited and if yes to display a dialog box showing a > question if the user wants to save tha changes or not. I test it with > dataset.HasChanges() but it returns true even only when i change the > record > with binding navigator... Does anybody know how to do this right?? Also > how > can i load a picture in the database and display it in a imagecontrol? > Thanks!!! > Yeah I've tryed this. It still doesn't work correct.. When i change the
record with binding navigator without editing something it still gives me that there are changes in the dataset... I'm testing it exactly as you describe: if(ds.HasChanges()) { ..... } Any ideas? Show quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:OZ1XTOvLGHA.1312@TK2MSFTNGP09.phx.gbl... > Radi, > > if (((DataSet)employeesBindingSource.DataSource).HasChanges() ) { > MessageBox.Show("There are changes"); > > if (northwindDataSet.HasChanges() ) { > MessageBox.Show("There are changes"); > > Both work fine for me. > > I hope this helps, > > Cor > > "Radi Radichev" <radi.radic***@uni-jena.de> schreef in bericht > news:OxqToSuLGHA.2628@TK2MSFTNGP15.phx.gbl... >> Hi! >> I'm trying to check in the OnFormClosing event if the dataset has changes >> that are still not commited and if yes to display a dialog box showing a >> question if the user wants to save tha changes or not. I test it with >> dataset.HasChanges() but it returns true even only when i change the >> record >> with binding navigator... Does anybody know how to do this right?? Also >> how >> can i load a picture in the database and display it in a imagecontrol? >> Thanks!!! >> > > Radi,
Than you should show more code, I gave you two working tested samples, I can really not look at your code without that you show it to me. Cor Show quote "Radi Radichev" <radi.radic***@uni-jena.de> schreef in bericht news:O4qSXsyLGHA.2668@tk2msftngp13.phx.gbl... > Yeah I've tryed this. It still doesn't work correct.. When i change the > record with binding navigator without editing something it still gives me > that there are changes in the dataset... I'm testing it exactly as you > describe: > if(ds.HasChanges()) > { > .... > } > Any ideas? > > > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message > news:OZ1XTOvLGHA.1312@TK2MSFTNGP09.phx.gbl... >> Radi, >> >> if (((DataSet)employeesBindingSource.DataSource).HasChanges() ) { >> MessageBox.Show("There are changes"); >> >> if (northwindDataSet.HasChanges() ) { >> MessageBox.Show("There are changes"); >> >> Both work fine for me. >> >> I hope this helps, >> >> Cor >> >> "Radi Radichev" <radi.radic***@uni-jena.de> schreef in bericht >> news:OxqToSuLGHA.2628@TK2MSFTNGP15.phx.gbl... >>> Hi! >>> I'm trying to check in the OnFormClosing event if the dataset has >>> changes >>> that are still not commited and if yes to display a dialog box showing a >>> question if the user wants to save tha changes or not. I test it with >>> dataset.HasChanges() but it returns true even only when i change the >>> record >>> with binding navigator... Does anybody know how to do this right?? Also >>> how >>> can i load a picture in the database and display it in a imagecontrol? >>> Thanks!!! >>> >> >> > > Oh well here's my code:
private void frmPersonal_FormClosing(object sender, FormClosingEventArgs e) { if (this.transcoDataSet.GetChanges()!=null) { DialogResult result; result = MessageBox.Show(this, "blabla", "blablaba", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button3); if (result == DialogResult.Yes) { this.Validate(); this.personalBindingSource.EndEdit(); this.personalTableAdapter.Update(this.transcoDataSet.personal); this.transcoDataSet.AcceptChanges(); } else if (result == DialogResult.No) e.Cancel = false; else if (result == DialogResult.Cancel) e.Cancel = true; } } Ahm there is a mistake here..
its if(this.transcoDataSet.HasChanges())----- Show quote "Radi Radichev" <radi.radic***@uni-jena.de> wrote in message news:%23fykTX8LGHA.3196@TK2MSFTNGP09.phx.gbl... > Oh well here's my code: > private void frmPersonal_FormClosing(object sender, FormClosingEventArgs > e) > > { > > if (this.transcoDataSet.GetChanges()!=null) > > { > > DialogResult result; > > result = MessageBox.Show(this, "blabla", "blablaba", > MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, > MessageBoxDefaultButton.Button3); > > if (result == DialogResult.Yes) > > { > > this.Validate(); > > this.personalBindingSource.EndEdit(); > > this.personalTableAdapter.Update(this.transcoDataSet.personal); > > this.transcoDataSet.AcceptChanges(); > > } > > else if (result == DialogResult.No) > > e.Cancel = false; > > else if (result == DialogResult.Cancel) > > e.Cancel = true; > > } > > } > > > > Radi,
Can you try this one transcoDataSet.Tables("yourtablename or the strongly typed one).EndCurrentEdit(); > its if(this.transcoDataSet.HasChanges())----- I hope this helpsCor Show quote > its if(this.transcoDataSet.HasChanges())----- > "Radi Radichev" <radi.radic***@uni-jena.de> wrote in message > news:%23fykTX8LGHA.3196@TK2MSFTNGP09.phx.gbl... >> Oh well here's my code: >> private void frmPersonal_FormClosing(object sender, FormClosingEventArgs >> e) >> >> { >> >> if (this.transcoDataSet.GetChanges()!=null) >> >> { >> >> DialogResult result; >> >> result = MessageBox.Show(this, "blabla", "blablaba", >> MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, >> MessageBoxDefaultButton.Button3); >> >> if (result == DialogResult.Yes) >> >> { >> >> this.Validate(); >> >> this.personalBindingSource.EndEdit(); >> >> this.personalTableAdapter.Update(this.transcoDataSet.personal); >> >> this.transcoDataSet.AcceptChanges(); >> >> } >> >> else if (result == DialogResult.No) >> >> e.Cancel = false; >> >> else if (result == DialogResult.Cancel) >> >> e.Cancel = true; >> >> } >> >> } >> >> >> >> > > Cor, I can't find such method...
Can you write this a little understandable pls? Show quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:e48XXr8LGHA.420@tk2msftngp13.phx.gbl... > Radi, > > Can you try this one > transcoDataSet.Tables("yourtablename or the strongly typed > one).EndCurrentEdit(); >> its if(this.transcoDataSet.HasChanges())----- > > I hope this helps > > Cor > >> its if(this.transcoDataSet.HasChanges())----- >> "Radi Radichev" <radi.radic***@uni-jena.de> wrote in message >> news:%23fykTX8LGHA.3196@TK2MSFTNGP09.phx.gbl... >>> Oh well here's my code: >>> private void frmPersonal_FormClosing(object sender, FormClosingEventArgs >>> e) >>> >>> { >>> >>> if (this.transcoDataSet.GetChanges()!=null) >>> >>> { >>> >>> DialogResult result; >>> >>> result = MessageBox.Show(this, "blabla", "blablaba", >>> MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, >>> MessageBoxDefaultButton.Button3); >>> >>> if (result == DialogResult.Yes) >>> >>> { >>> >>> this.Validate(); >>> >>> this.personalBindingSource.EndEdit(); >>> >>> this.personalTableAdapter.Update(this.transcoDataSet.personal); >>> >>> this.transcoDataSet.AcceptChanges(); >>> >>> } >>> >>> else if (result == DialogResult.No) >>> >>> e.Cancel = false; >>> >>> else if (result == DialogResult.Cancel) >>> >>> e.Cancel = true; >>> >>> } >>> >>> } >>> >>> >>> >>> >> >> > > Radi,
Has to be brackets, it is a property. transcoDataSet.Tables["yourtablename"].EndCurrentEdit(); (It was some mix between C# and VBCode at the end I did remember me that you are using C#) My keyboard is broken, I have now an old one however while typing with a broken keyboard I had not much attention to the syntax, I was glad it was typing. :-) CorShow quote "Radi Radichev" <radi.radic***@uni-jena.de> schreef in bericht news:%23kAD8I9LGHA.3144@TK2MSFTNGP11.phx.gbl... > Cor, I can't find such method... > Can you write this a little understandable pls? > > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message > news:e48XXr8LGHA.420@tk2msftngp13.phx.gbl... >> Radi, >> >> Can you try this one >> transcoDataSet.Tables("yourtablename or the strongly typed >> one).EndCurrentEdit(); >>> its if(this.transcoDataSet.HasChanges())----- >> >> I hope this helps >> >> Cor >> >>> its if(this.transcoDataSet.HasChanges())----- >>> "Radi Radichev" <radi.radic***@uni-jena.de> wrote in message >>> news:%23fykTX8LGHA.3196@TK2MSFTNGP09.phx.gbl... >>>> Oh well here's my code: >>>> private void frmPersonal_FormClosing(object sender, >>>> FormClosingEventArgs e) >>>> >>>> { >>>> >>>> if (this.transcoDataSet.GetChanges()!=null) >>>> >>>> { >>>> >>>> DialogResult result; >>>> >>>> result = MessageBox.Show(this, "blabla", "blablaba", >>>> MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, >>>> MessageBoxDefaultButton.Button3); >>>> >>>> if (result == DialogResult.Yes) >>>> >>>> { >>>> >>>> this.Validate(); >>>> >>>> this.personalBindingSource.EndEdit(); >>>> >>>> this.personalTableAdapter.Update(this.transcoDataSet.personal); >>>> >>>> this.transcoDataSet.AcceptChanges(); >>>> >>>> } >>>> >>>> else if (result == DialogResult.No) >>>> >>>> e.Cancel = false; >>>> >>>> else if (result == DialogResult.Cancel) >>>> >>>> e.Cancel = true; >>>> >>>> } >>>> >>>> } >>>> >>>> >>>> >>>> >>> >>> >> >> > > When I use the binding source to change the record to the next recort it
automaticly changes somehow the state to modified and when i check it with HasChanges() it gives me true every time when i look another records.. I can't find info on this in msdn.... Show quote "Radi Radichev" <radi.radic***@uni-jena.de> wrote in message news:%23kAD8I9LGHA.3144@TK2MSFTNGP11.phx.gbl... > Cor, I can't find such method... > Can you write this a little understandable pls? > > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message > news:e48XXr8LGHA.420@tk2msftngp13.phx.gbl... >> Radi, >> >> Can you try this one >> transcoDataSet.Tables("yourtablename or the strongly typed >> one).EndCurrentEdit(); >>> its if(this.transcoDataSet.HasChanges())----- >> >> I hope this helps >> >> Cor >> >>> its if(this.transcoDataSet.HasChanges())----- >>> "Radi Radichev" <radi.radic***@uni-jena.de> wrote in message >>> news:%23fykTX8LGHA.3196@TK2MSFTNGP09.phx.gbl... >>>> Oh well here's my code: >>>> private void frmPersonal_FormClosing(object sender, >>>> FormClosingEventArgs e) >>>> >>>> { >>>> >>>> if (this.transcoDataSet.GetChanges()!=null) >>>> >>>> { >>>> >>>> DialogResult result; >>>> >>>> result = MessageBox.Show(this, "blabla", "blablaba", >>>> MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, >>>> MessageBoxDefaultButton.Button3); >>>> >>>> if (result == DialogResult.Yes) >>>> >>>> { >>>> >>>> this.Validate(); >>>> >>>> this.personalBindingSource.EndEdit(); >>>> >>>> this.personalTableAdapter.Update(this.transcoDataSet.personal); >>>> >>>> this.transcoDataSet.AcceptChanges(); >>>> >>>> } >>>> >>>> else if (result == DialogResult.No) >>>> >>>> e.Cancel = false; >>>> >>>> else if (result == DialogResult.Cancel) >>>> >>>> e.Cancel = true; >>>> >>>> } >>>> >>>> } >>>> >>>> >>>> >>>> >>> >>> >> >> > > Hehe Cor:)
I know it's a property. I did write it correct.. But there is no such thing.... You know I'm using .net 2.0 right? Show quote "Radi Radichev" <radi.radic***@uni-jena.de> wrote in message news:ObwPbR9LGHA.984@tk2msftngp13.phx.gbl... > When I use the binding source to change the record to the next recort it > automaticly changes somehow the state to modified and when i check it with > HasChanges() it gives me true every time when i look another records.. I > can't find info on this in msdn.... > > > > "Radi Radichev" <radi.radic***@uni-jena.de> wrote in message > news:%23kAD8I9LGHA.3144@TK2MSFTNGP11.phx.gbl... >> Cor, I can't find such method... >> Can you write this a little understandable pls? >> >> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message >> news:e48XXr8LGHA.420@tk2msftngp13.phx.gbl... >>> Radi, >>> >>> Can you try this one >>> transcoDataSet.Tables("yourtablename or the strongly typed >>> one).EndCurrentEdit(); >>>> its if(this.transcoDataSet.HasChanges())----- >>> >>> I hope this helps >>> >>> Cor >>> >>>> its if(this.transcoDataSet.HasChanges())----- >>>> "Radi Radichev" <radi.radic***@uni-jena.de> wrote in message >>>> news:%23fykTX8LGHA.3196@TK2MSFTNGP09.phx.gbl... >>>>> Oh well here's my code: >>>>> private void frmPersonal_FormClosing(object sender, >>>>> FormClosingEventArgs e) >>>>> >>>>> { >>>>> >>>>> if (this.transcoDataSet.GetChanges()!=null) >>>>> >>>>> { >>>>> >>>>> DialogResult result; >>>>> >>>>> result = MessageBox.Show(this, "blabla", "blablaba", >>>>> MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, >>>>> MessageBoxDefaultButton.Button3); >>>>> >>>>> if (result == DialogResult.Yes) >>>>> >>>>> { >>>>> >>>>> this.Validate(); >>>>> >>>>> this.personalBindingSource.EndEdit(); >>>>> >>>>> this.personalTableAdapter.Update(this.transcoDataSet.personal); >>>>> >>>>> this.transcoDataSet.AcceptChanges(); >>>>> >>>>> } >>>>> >>>>> else if (result == DialogResult.No) >>>>> >>>>> e.Cancel = false; >>>>> >>>>> else if (result == DialogResult.Cancel) >>>>> >>>>> e.Cancel = true; >>>>> >>>>> } >>>>> >>>>> } >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > Radi,
Sorry this I have sent hundreds of times, as I said malfunction of my keyboard and therefore probably less attention. BindingContext[here that table].EndCurrentEdit() I hope this goes better. The keyboard I am now using is as well not so good. Cor Show quote "Radi Radichev" <radi.radic***@uni-jena.de> schreef in bericht news:uhu$WX9LGHA.3012@TK2MSFTNGP14.phx.gbl... > Hehe Cor:) > I know it's a property. I did write it correct.. But there is no such > thing.... You know I'm using .net 2.0 right? > > "Radi Radichev" <radi.radic***@uni-jena.de> wrote in message > news:ObwPbR9LGHA.984@tk2msftngp13.phx.gbl... >> When I use the binding source to change the record to the next recort it >> automaticly changes somehow the state to modified and when i check it >> with HasChanges() it gives me true every time when i look another >> records.. I can't find info on this in msdn.... >> >> >> >> "Radi Radichev" <radi.radic***@uni-jena.de> wrote in message >> news:%23kAD8I9LGHA.3144@TK2MSFTNGP11.phx.gbl... >>> Cor, I can't find such method... >>> Can you write this a little understandable pls? >>> >>> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message >>> news:e48XXr8LGHA.420@tk2msftngp13.phx.gbl... >>>> Radi, >>>> >>>> Can you try this one >>>> transcoDataSet.Tables("yourtablename or the strongly typed >>>> one).EndCurrentEdit(); >>>>> its if(this.transcoDataSet.HasChanges())----- >>>> >>>> I hope this helps >>>> >>>> Cor >>>> >>>>> its if(this.transcoDataSet.HasChanges())----- >>>>> "Radi Radichev" <radi.radic***@uni-jena.de> wrote in message >>>>> news:%23fykTX8LGHA.3196@TK2MSFTNGP09.phx.gbl... >>>>>> Oh well here's my code: >>>>>> private void frmPersonal_FormClosing(object sender, >>>>>> FormClosingEventArgs e) >>>>>> >>>>>> { >>>>>> >>>>>> if (this.transcoDataSet.GetChanges()!=null) >>>>>> >>>>>> { >>>>>> >>>>>> DialogResult result; >>>>>> >>>>>> result = MessageBox.Show(this, "blabla", "blablaba", >>>>>> MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, >>>>>> MessageBoxDefaultButton.Button3); >>>>>> >>>>>> if (result == DialogResult.Yes) >>>>>> >>>>>> { >>>>>> >>>>>> this.Validate(); >>>>>> >>>>>> this.personalBindingSource.EndEdit(); >>>>>> >>>>>> this.personalTableAdapter.Update(this.transcoDataSet.personal); >>>>>> >>>>>> this.transcoDataSet.AcceptChanges(); >>>>>> >>>>>> } >>>>>> >>>>>> else if (result == DialogResult.No) >>>>>> >>>>>> e.Cancel = false; >>>>>> >>>>>> else if (result == DialogResult.Cancel) >>>>>> >>>>>> e.Cancel = true; >>>>>> >>>>>> } >>>>>> >>>>>> } >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > Yeah I found it but where schould i try it? When I update the dataset or
where? Show quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:%23zSCre9LGHA.3896@TK2MSFTNGP15.phx.gbl... > Radi, > > Sorry this I have sent hundreds of times, as I said malfunction of my > keyboard and therefore probably less attention. > > BindingContext[here that table].EndCurrentEdit() > > I hope this goes better. > > The keyboard I am now using is as well not so good. > > Cor > > > > "Radi Radichev" <radi.radic***@uni-jena.de> schreef in bericht > news:uhu$WX9LGHA.3012@TK2MSFTNGP14.phx.gbl... >> Hehe Cor:) >> I know it's a property. I did write it correct.. But there is no such >> thing.... You know I'm using .net 2.0 right? >> >> "Radi Radichev" <radi.radic***@uni-jena.de> wrote in message >> news:ObwPbR9LGHA.984@tk2msftngp13.phx.gbl... >>> When I use the binding source to change the record to the next recort it >>> automaticly changes somehow the state to modified and when i check it >>> with HasChanges() it gives me true every time when i look another >>> records.. I can't find info on this in msdn.... >>> >>> >>> >>> "Radi Radichev" <radi.radic***@uni-jena.de> wrote in message >>> news:%23kAD8I9LGHA.3144@TK2MSFTNGP11.phx.gbl... >>>> Cor, I can't find such method... >>>> Can you write this a little understandable pls? >>>> >>>> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message >>>> news:e48XXr8LGHA.420@tk2msftngp13.phx.gbl... >>>>> Radi, >>>>> >>>>> Can you try this one >>>>> transcoDataSet.Tables("yourtablename or the strongly typed >>>>> one).EndCurrentEdit(); >>>>>> its if(this.transcoDataSet.HasChanges())----- >>>>> >>>>> I hope this helps >>>>> >>>>> Cor >>>>> >>>>>> its if(this.transcoDataSet.HasChanges())----- >>>>>> "Radi Radichev" <radi.radic***@uni-jena.de> wrote in message >>>>>> news:%23fykTX8LGHA.3196@TK2MSFTNGP09.phx.gbl... >>>>>>> Oh well here's my code: >>>>>>> private void frmPersonal_FormClosing(object sender, >>>>>>> FormClosingEventArgs e) >>>>>>> >>>>>>> { >>>>>>> >>>>>>> if (this.transcoDataSet.GetChanges()!=null) >>>>>>> >>>>>>> { >>>>>>> >>>>>>> DialogResult result; >>>>>>> >>>>>>> result = MessageBox.Show(this, "blabla", "blablaba", >>>>>>> MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, >>>>>>> MessageBoxDefaultButton.Button3); >>>>>>> >>>>>>> if (result == DialogResult.Yes) >>>>>>> >>>>>>> { >>>>>>> >>>>>>> this.Validate(); >>>>>>> >>>>>>> this.personalBindingSource.EndEdit(); >>>>>>> >>>>>>> this.personalTableAdapter.Update(this.transcoDataSet.personal); >>>>>>> >>>>>>> this.transcoDataSet.AcceptChanges(); >>>>>>> >>>>>>> } >>>>>>> >>>>>>> else if (result == DialogResult.No) >>>>>>> >>>>>>> e.Cancel = false; >>>>>>> >>>>>>> else if (result == DialogResult.Cancel) >>>>>>> >>>>>>> e.Cancel = true; >>>>>>> >>>>>>> } >>>>>>> >>>>>>> } >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > The problem is that i can't move trough the records with the binding
navigator or with the binding source couse they change the RowState to Modified and there are allways changes when i test the dataset with HasChanges()!! I can't understand why this is... Show quote "Radi Radichev" <radi.radic***@uni-jena.de> wrote in message news:OxqToSuLGHA.2628@TK2MSFTNGP15.phx.gbl... > Hi! > I'm trying to check in the OnFormClosing event if the dataset has changes > that are still not commited and if yes to display a dialog box showing a > question if the user wants to save tha changes or not. I test it with > dataset.HasChanges() but it returns true even only when i change the > record > with binding navigator... Does anybody know how to do this right?? Also > how > can i load a picture in the database and display it in a imagecontrol? > Thanks!!! > Radi,
As I told, than you should sent the code you use to navigate, now you have showed to code as that is already done. Cor Hi Cor,
I'm not using any code! I just put a BindingNavigator control and it does all these things, movenext, prev add new and so on. I tryed to write my own navigating button with OnClick method like this: this.personalBinfingSource1.MoveNext(); and it moves through the records but it still changes the state to modified even if i'm not making any changes only browsing the records... I hope that it is now clearer what am i doing... Show quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:OUd0Pf9LGHA.2472@TK2MSFTNGP11.phx.gbl... > Radi, > > As I told, than you should sent the code you use to navigate, now you have > showed to code as that is already done. > > Cor > Radi,
That was what I was thinking, I have tested it before and it does not give changes by me, I have showed the code already to you. move a position to the next employeesBindingNavigator.MoveNextItem.PerformClick(); cor Show quote "Radi Radichev" <radi.radic***@uni-jena.de> schreef in bericht news:%23w42Wm9LGHA.2668@tk2msftngp13.phx.gbl... > Hi Cor, > I'm not using any code! I just put a BindingNavigator control and it does > all these things, movenext, prev add new and so on. I tryed to write my > own navigating button with OnClick method like this: > this.personalBinfingSource1.MoveNext(); > and it moves through the records but it still changes the state to > modified even if i'm not making any changes only browsing the records... I > hope that it is now clearer what am i doing... > > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message > news:OUd0Pf9LGHA.2472@TK2MSFTNGP11.phx.gbl... >> Radi, >> >> As I told, than you should sent the code you use to navigate, now you >> have showed to code as that is already done. >> >> Cor >> > > I can't really understand what u mean by that...
what about PerformClick()? it does the same thing.. Show quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:em$SW29LGHA.1180@TK2MSFTNGP09.phx.gbl... > Radi, > > That was what I was thinking, I have tested it before and it does not give > changes by me, I have showed the code already to you. > > move a position to the next > > employeesBindingNavigator.MoveNextItem.PerformClick(); > > > cor > "Radi Radichev" <radi.radic***@uni-jena.de> schreef in bericht > news:%23w42Wm9LGHA.2668@tk2msftngp13.phx.gbl... >> Hi Cor, >> I'm not using any code! I just put a BindingNavigator control and it does >> all these things, movenext, prev add new and so on. I tryed to write my >> own navigating button with OnClick method like this: >> this.personalBinfingSource1.MoveNext(); >> and it moves through the records but it still changes the state to >> modified even if i'm not making any changes only browsing the records... >> I hope that it is now clearer what am i doing... >> >> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message >> news:OUd0Pf9LGHA.2472@TK2MSFTNGP11.phx.gbl... >>> Radi, >>> >>> As I told, than you should sent the code you use to navigate, now you >>> have showed to code as that is already done. >>> >>> Cor >>> >> >> > > I'm getting crazy with this one!! It return allways true except when i open
the form do nothing and then clos the form!!!! WHAT COULD BE WRONG:((((((((((( Show quote "Radi Radichev" <radi.radic***@uni-jena.de> wrote in message news:%23A4UP69LGHA.3196@TK2MSFTNGP09.phx.gbl... >I can't really understand what u mean by that... > what about PerformClick()? it does the same thing.. > > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message > news:em$SW29LGHA.1180@TK2MSFTNGP09.phx.gbl... >> Radi, >> >> That was what I was thinking, I have tested it before and it does not >> give changes by me, I have showed the code already to you. >> >> move a position to the next >> >> employeesBindingNavigator.MoveNextItem.PerformClick(); >> >> >> cor >> "Radi Radichev" <radi.radic***@uni-jena.de> schreef in bericht >> news:%23w42Wm9LGHA.2668@tk2msftngp13.phx.gbl... >>> Hi Cor, >>> I'm not using any code! I just put a BindingNavigator control and it >>> does all these things, movenext, prev add new and so on. I tryed to >>> write my own navigating button with OnClick method like this: >>> this.personalBinfingSource1.MoveNext(); >>> and it moves through the records but it still changes the state to >>> modified even if i'm not making any changes only browsing the records... >>> I hope that it is now clearer what am i doing... >>> >>> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message >>> news:OUd0Pf9LGHA.2472@TK2MSFTNGP11.phx.gbl... >>>> Radi, >>>> >>>> As I told, than you should sent the code you use to navigate, now you >>>> have showed to code as that is already done. >>>> >>>> Cor >>>> >>> >>> >> >> > > > I'm getting crazy with this one!! It return allways true except when The best suggestion I could offer, if you're still struggling with > i open the form do nothing and then clos the form!!!! WHAT COULD BE > WRONG:((((((((((( this issue, is to recreate the problem in a new project using sample tables, as few controls, and as little code as possible. Assuming you're still able to reproduce the problem, you're now in a better position to help others reproduce the problem. Of course, I'm biased because I'm already crazy. I hope this information proves helpful. David Sceppa Microsoft This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use. © 2006 Microsoft Corporation. All rights reserved. |
|||||||||||||||||||||||