Skip to content
Discussion options

You must be logged in to vote

I know this OP is quite old but I'll answer this anyway, as I hit this very problem myself today.

I believe the issue is due to the Grid relying on object.GetHashCode() to arrive at row (TR) "uniqueness". It's widely understood that GetHashCode() is not truly unique and sometimes there can be collisions with other objects that form a dataset. I believe that's what we're seeing here.

I visited the GitHub code for the Grid and found that you can override the default key assignment by using the grid RowKeySelector attribute. For example ...

On my object I have an Id, which is a primary key and an identity column. I assigned my own key on the grid with.

<Grid RowKeySelector="(o) => o.Id" />

H…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gvreddy04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants