Problem with DataGrid and new records?

Apr 22, 2009 at 12:04 PM


I just updated a project to the latest tookit version however I'm running into a problem with my grids.  I have it bound to a BindingList<T> and it's displaying the data loaded into that list from db fine.  However when I edit the blank/new row at the bottom and hit enter it creates a new row which is highlighted in blue/selected, if I type some more it edits the line I was just editing instead of the new highlighted row.  Now both rows are highlighted and even though the top row has the blackbox around an item I can't hit the down arrow on the keyboard to move down to the just created row.  If I single click on the new row then it creates a new row below it, and clicking on this 3rd row highlights it and the second row.

What in the world is going on?

                <tk:datagrid grid.row="0" itemssource="{Binding Employees}" autogeneratecolumns="False">
                        <tk:datagridtextcolumn header="Employee Name" width="*" binding="{Binding Path=Name}"></tk:datagridtextcolumn>
That's an example of one of the grids running into this problem.
Apr 22, 2009 at 1:01 PM
OK well I narrowed my problem down, albeit not resolved yet.  It appears it's a result of the classes Equals function being overriden as nhibernate is being used as the DAL backend.