I am using an editable RadGridView to present a collection of items of a class, which overrides the GetHashCode method in a way that hash codes are not unique. The problem is that in such a case changing property values from code is not reflected in grid cells. The problem is gone when hash codes are unique.
I found a forum post from 2011 which says that GridView does not support items with non-unique hash codes.
My question is: Has it been fixed already? Is it planned to be fixed?
I perceive it as a bug, having in mind a rule that equal items have the same hashes, but equal hashes don't determine that objects are the same. I think that the grid should handle items with the same hash code properly.
---------------------------------------------------------------------------------------------------------
Some more details about my problem:
I simplified my class to the following one:
So behaviour of this class is the following:
- changing the Name column should also change the Description column
- hashcodes for multiple items may be the same
However, a grid which is bound to a collection of such items doesn't work as expected. After editing a Name column, the Description property gets updated, but the change is not visible in the grid. The Description cell gets updated only when I click on the cell and open its editor.
I found a forum post from 2011 which says that GridView does not support items with non-unique hash codes.
My question is: Has it been fixed already? Is it planned to be fixed?
I perceive it as a bug, having in mind a rule that equal items have the same hashes, but equal hashes don't determine that objects are the same. I think that the grid should handle items with the same hash code properly.
---------------------------------------------------------------------------------------------------------
Some more details about my problem:
I simplified my class to the following one:
public class Entry : PropertyChangedBase{ private string name; public string Name { get { return this.name; } set { this.name = value; this.NotifyOfPropertyChange(() => this.Name); this.description = "new content of a description cell"; this.NotifyOfPropertyChange(() => this.Description); } } private string description; public string Description { get { return this.description; } set { this.description = value; this.NotifyOfPropertyChange(() => this.Description); } } public override int GetHashCode() { return 145; }}So behaviour of this class is the following:
- changing the Name column should also change the Description column
- hashcodes for multiple items may be the same
However, a grid which is bound to a collection of such items doesn't work as expected. After editing a Name column, the Description property gets updated, but the change is not visible in the grid. The Description cell gets updated only when I click on the cell and open its editor.