Adapter, Databinding and DataGridView

Posts   
 
    
JimHugh
User
Posts: 191
Joined: 16-Nov-2005
# Posted on: 29-Jan-2006 15:50:20   

Using VS2005, LLBLGen 1.2005.1, WinForms 2.0

Just wanted a sanity check if you don't mind.

When adding a new entity to a databound entitycollection, is this the correct way to set the current position to the newly added entity?


        Dim newCustomer As New EntityClasses.CustomerEntity
        Me.BindingSource1.Position = Me.ecCustomer.Add(newCustomer)

It seems obvious now, but you don't want to know how many variations I tried rage until I hit on this one.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39930
Joined: 17-Aug-2003
# Posted on: 29-Jan-2006 16:34:27   

Correct.

Frans Bouma | Lead developer LLBLGen Pro