This is a migrated thread and some comments may be shown as answers.

Troubles with SelectedItems

1 Answer 28 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Gerard Kerbourch
Top achievements
Rank 1
Gerard Kerbourch asked on 18 May 2010, 05:07 PM
Hi,

Step 1: Editing cell on the current row of the gridview.
Step 2: Click on another row.
>>> Line 1 is still present in the selectedItems object (???)

We use silverlight 4 and Visual Studio 10.
We load gridview with this methods :
http://blogs.telerik.com/vladimirenchev/posts/09-04-23/lightweight_datatable_for_your_silverlight_applications.aspx


Have you any suggestion to help us...

Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Milan
Telerik team
answered on 19 May 2010, 09:23 AM
Hello Gerard Kerbourch,

As far as I can see you are using our implementation of DataTable which by default creates custom implementations of GetHashCode and Equals methods for the data items. As a result of this custom implementations whenever you edit an item its GetHashCode changes and RadGridView cannot remove this item from SelectedItems. 

Luckily the solution is very simple - open Dynamic.cs file and modify the CreateDynamicClass method by removing the calls to GenerateEquals(tb, fields) and GenerateGetHashCode(tb, fields). Once those calls are removed the issues should be resolved. 


All the best,
Milan
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
Gerard Kerbourch
Top achievements
Rank 1
Answers by
Milan
Telerik team
Share this question
or