Home All Groups Group Topic Archive Search About

datagridview and bindingnavigator add/delete item strange behaviou

Author
18 Feb 2009 10:39 PM
NetNewbie
Hi,

I noticed the following behaviour with datagridview. I am hoping someone can
suggest me the solution. I have several DGV's in my application through which
data can be entered/modified/deleted. All the DGV are database bound.

I also have binding navigators for each og the DGV's. From my testing I
noticed that one can enter a new row in 2 ways.
a) by clicking in the last row in DGV by scrolling down.
b) by clicking on the addnew button in the binding navigator/toorstrip.

for a) I noticed that the new row has a * and an arrow on the same row. But
for b) I noticed that the * is on a different row and the arrow on a
diffrent row.

Now when a row is entered using option a) and then user clicks delete from
the bindingnavigator, 2 rows get deleted. This means a row is unintentionally
deleted. For option b) since there were 2 rows (with a * and an arrow), the
delete operation does not affect an actual row.

Has anybody else seen this behaviour ? I hope I was able to explain it
clearly. Any help on how to have the same delete behaviour no matter how a
new row is created will be ggreatly helpful.

Thank you

Author
19 Feb 2009 1:06 AM
Bill McCarthy
Hi NetNewbie,

It looks like you are using the .NET versions of VB, in which case best to
ask in a more specific group that specializes in .NET such as :

microsoft.public.dotnet.languages.vb




Show quoteHide quote
"NetNewbie" <NetNew***@discussions.microsoft.com> wrote in message
news:46341269-87FA-459A-A3A2-972B04D1DAD1@microsoft.com...
> Hi,
>
> I noticed the following behaviour with datagridview. I am hoping someone
> can
> suggest me the solution. I have several DGV's in my application through
> which
> data can be entered/modified/deleted. All the DGV are database bound.
>
> I also have binding navigators for each og the DGV's. From my testing I
> noticed that one can enter a new row in 2 ways.
> a) by clicking in the last row in DGV by scrolling down.
> b) by clicking on the addnew button in the binding navigator/toorstrip.
>
> for a) I noticed that the new row has a * and an arrow on the same row.
> But
> for b) I noticed that the * is on a different row and the arrow on a
> diffrent row.
>
> Now when a row is entered using option a) and then user clicks delete from
> the bindingnavigator, 2 rows get deleted. This means a row is
> unintentionally
> deleted. For option b) since there were 2 rows (with a * and an arrow),
> the
> delete operation does not affect an actual row.
>
> Has anybody else seen this behaviour ? I hope I was able to explain it
> clearly. Any help on how to have the same delete behaviour no matter how a
> new row is created will be ggreatly helpful.
>
> Thank you
>
Author
19 Feb 2009 3:30 PM
NetNewbie
Thank you Mr.McCarthy, for directing me to the correct group. I tried looking
for one and probably did not look in the right spot.

Show quoteHide quote
"Bill McCarthy" wrote:

> Hi NetNewbie,
>
> It looks like you are using the .NET versions of VB, in which case best to
> ask in a more specific group that specializes in .NET such as :
>
> microsoft.public.dotnet.languages.vb
>
>
>
>
> "NetNewbie" <NetNew***@discussions.microsoft.com> wrote in message
> news:46341269-87FA-459A-A3A2-972B04D1DAD1@microsoft.com...
> > Hi,
> >
> > I noticed the following behaviour with datagridview. I am hoping someone
> > can
> > suggest me the solution. I have several DGV's in my application through
> > which
> > data can be entered/modified/deleted. All the DGV are database bound.
> >
> > I also have binding navigators for each og the DGV's. From my testing I
> > noticed that one can enter a new row in 2 ways.
> > a) by clicking in the last row in DGV by scrolling down.
> > b) by clicking on the addnew button in the binding navigator/toorstrip.
> >
> > for a) I noticed that the new row has a * and an arrow on the same row.
> > But
> > for b) I noticed that the * is on a different row and the arrow on a
> > diffrent row.
> >
> > Now when a row is entered using option a) and then user clicks delete from
> > the bindingnavigator, 2 rows get deleted. This means a row is
> > unintentionally
> > deleted. For option b) since there were 2 rows (with a * and an arrow),
> > the
> > delete operation does not affect an actual row.
> >
> > Has anybody else seen this behaviour ? I hope I was able to explain it
> > clearly. Any help on how to have the same delete behaviour no matter how a
> > new row is created will be ggreatly helpful.
> >
> > Thank you
> >
>
>