Home All Groups Group Topic Archive Search About

Add new row to a databound DatagridView

Author
28 Jun 2006 4:51 PM
Bill Nguyen
I would like to allow user to add new row to a bound DGV. I was able to
supply default values for all columns in teh new row. However, as soon as
the cursor leaves the new row, the whole row dispappear! This doesn't happen
to rows exist in the datasource.
I tried to use .newrowneeded but to no avail.
Please tell me if this is possible or I have to use unbound or vitual mode.

Thanks a million

Bill

-----------

With dgvPC

..AutoGenerateColumns = False  ' I defined columns myself

..AllowUserToAddRows = True

..AllowUserToDeleteRows = True

..DataSource = dDriverHour

End With

Author
17 Jul 2006 8:20 PM
ahaskins
I have run into the same issue. Have you found a solution? Thanks, Alan


Bill Nguyen wrote:
Show quoteHide quote
> I would like to allow user to add new row to a bound DGV. I was able to
> supply default values for all columns in teh new row. However, as soon as
> the cursor leaves the new row, the whole row dispappear! This doesn't happen
> to rows exist in the datasource.
> I tried to use .newrowneeded but to no avail.
> Please tell me if this is possible or I have to use unbound or vitual mode.
>
> Thanks a million
>
> Bill
>
> -----------
>
> With dgvPC
>
> .AutoGenerateColumns = False  ' I defined columns myself
>
> .AllowUserToAddRows = True
>
> .AllowUserToDeleteRows = True
>
> .DataSource = dDriverHour
>
> End With