Business Binding Source is one record behind select grid row


Author
Message
Thomas Holste
Thomas Holste
StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)StrataFrame User (360 reputation)
Group: StrataFrame Users
Posts: 144, Visits: 618
Hi there,

I have encountered a problem which goes like this:

I put a BO (customers from the sample-db) on a form. Add a Business Binding Source which is connected to the BO. Then I add a grid whose datasource is the BBS. Now I want to test a little row/cell-formatting depending on different values on the database. The first step was to show one field (Last Name) in a correponding textbox. I wrote this code



Private Sub DataGridView1_RowEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.RowEnter

TextBox1.Text = BBS.BusinessObject.Item(
"cust_lastname")

End Sub



But this does not work. The textbox is always one record behind. For example.

It starts with "Achong". I skip down one record down to "Abel", the textbox still shows "Achong". I skip to the next record "Smith", the textbox now show "Abel". So it seems that the BBS is one record behind the selected row on the grid.

Did I miss something there? If I try this with a dataset bound to the grid, it works correct.

Best regards

Thomas
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Thomas Holste - 13 Years Ago
Edhy Rijo - 13 Years Ago
Thomas Holste - 13 Years Ago
Edhy Rijo - 13 Years Ago
Thomas Holste - 13 Years Ago
Thomas Holste - 13 Years Ago
                         [quote][b]Thomas Holste (9/16/2011)[/b][hr]If I want, for example,...
Edhy Rijo - 13 Years Ago
                             Hi Edhy, that is good news as I have just downloaded a trial version...
Thomas Holste - 13 Years Ago
                                 You are welcome Thomas, and keep us posted with your improvement on...
Edhy Rijo - 13 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search