Home All Groups Group Topic Archive Search About

Data Set Changes and Image importing

Author
11 Feb 2006 8:25 AM
Radi Radichev
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!!!

Author
11 Feb 2006 10:12 AM
Cor Ligthert [MVP]
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!!!
>
Author
11 Feb 2006 4:49 PM
Radi Radichev
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!!!
>>
>
>
Author
12 Feb 2006 6:42 AM
Cor Ligthert [MVP]
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!!!
>>>
>>
>>
>
>
Author
12 Feb 2006 11:16 AM
Radi Radichev
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;

}

}
Author
12 Feb 2006 11:18 AM
Radi Radichev
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;
>
> }
>
> }
>
>
>
>
Author
12 Feb 2006 11:53 AM
Cor Ligthert [MVP]
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

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;
>>
>> }
>>
>> }
>>
>>
>>
>>
>
>
Author
12 Feb 2006 12:45 PM
Radi Radichev
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;
>>>
>>> }
>>>
>>> }
>>>
>>>
>>>
>>>
>>
>>
>
>
Author
12 Feb 2006 12:56 PM
Cor Ligthert [MVP]
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.

:-)

Cor

Show 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;
>>>>
>>>> }
>>>>
>>>> }
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Author
12 Feb 2006 1:00 PM
Radi Radichev
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;
>>>>
>>>> }
>>>>
>>>> }
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Author
12 Feb 2006 1:11 PM
Radi Radichev
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;
>>>>>
>>>>> }
>>>>>
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Author
12 Feb 2006 1:25 PM
Cor Ligthert [MVP]
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;
>>>>>>
>>>>>> }
>>>>>>
>>>>>> }
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Author
12 Feb 2006 1:32 PM
Radi Radichev
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;
>>>>>>>
>>>>>>> }
>>>>>>>
>>>>>>> }
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Author
12 Feb 2006 1:13 PM
Radi Radichev
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!!!
>
Author
12 Feb 2006 1:26 PM
Cor Ligthert [MVP]
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
Author
12 Feb 2006 1:38 PM
Radi Radichev
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
>
Author
12 Feb 2006 2:07 PM
Cor Ligthert [MVP]
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
>>
>
>
Author
12 Feb 2006 2:13 PM
Radi Radichev
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
>>>
>>
>>
>
>
Author
12 Feb 2006 3:20 PM
Radi Radichev
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
>>>>
>>>
>>>
>>
>>
>
>
Author
23 Feb 2006 12:14 AM
David Sceppa [MSFT]
> 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:(((((((((((

     The best suggestion I could offer, if you're still struggling with
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.

AddThis Social Bookmark Button