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

GridView and IEditableCollectionView, who's the boss ?

3 Answers 93 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Anna
Top achievements
Rank 2
Anna asked on 22 Mar 2011, 02:34 PM
Hi, I'm just begining to use the telerik Silverlight radcontrols. I'm trying to understand the gridView and I don't understand the interaction between the Grid and my collection. I have a custom IEditableCollectionView, this list have some logic to prevent editing of some of it's items. 
 
I have 2 issues :
1 ) if I call the EditItem method on the collection, the Grid does not react to the change

2) If the user start editing with the grid, the Grid will call EditItem on my collection, but it will ignore if the collection allows or not the edit request. If the request is denied, the collection doesn't place the item on CurrentEditItem.

Is this normal ? Is there a way to have the GridView more "in sync" with the IEditableCollectionView ?

Thank you in advance
Marc-Antoine

3 Answers, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 28 Mar 2011, 06:59 AM
Hi Marc-Antoine,

In general RadGridView supports IEditableCollectionView but unfortunately that interface lacks any synchronization mechanism like (events for example) which can be used from RadGridView. There is even no property that can be used in cases like yours (CanEdit for example). RadGridView have a property called IsReadOnlyBinding which can be used to prevent editing on an item (cell) level.

So I think that such behavior is a normal and expected.
Let me know if you need further assistance.

Greetings,
Nedyalko Nikolov
the Telerik team
0
Anna
Top achievements
Rank 2
answered on 30 Mar 2011, 03:47 PM
Thank you for you answer, indeed, the interface is lacking. Is there another interface you support which would give more power to the collection itself and not to the grid ? My goal is to have the grid reflect the state of the collection, with the minimum binding, events and behavior.

Marc-Antoine
0
Nedyalko Nikolov
Telerik team
answered on 31 Mar 2011, 10:50 PM
Hi Marc-Antoine,

I'm not aware of any interface that could be used to automatically put RadGridView into edit mode.

All the best,
Nedyalko Nikolov
the Telerik team
Tags
GridView
Asked by
Anna
Top achievements
Rank 2
Answers by
Nedyalko Nikolov
Telerik team
Anna
Top achievements
Rank 2
Share this question
or