LLBLGen Pro Version: 2.5 Final, December 5, 2007
Runtime Library Version: 2.5.7.1214
Code Generation: C#, .NET 2.0, SelfServicing
Database: SQL Server 2005
In a WinForms application I have a DataGridView that is bound to an EntityCollection via a BindingSource. The DataGridView is auto-generating its columns based on the EntityCollection.
The problem I'm having is that after the user sorts the grid by clicking on column headers, the row indices in the grid no longer match the row indices in the underlying EntityCollection datasource. This presents a problem when I want to delete a row from the collection based on the current row index in the grid.
Am I missing some setting that keeps the EntityCollection in sync with the grid sort? Or is there some nice way to keep track of which row in the grid matches the row in the collection?
Thanks in advance for your advice.
Bret