I think that this problem appear in SL4, but i am not sure.
However.
On button click i call grid.BeginInsert();
Then on some custom logic, i want to cancel insert. I call grid.CancelEdit() since CancelInsert() doesn't exists, but the grid doesn't delete that item that appears on BeginInsert().
Watch the attachment.
However.
On button click i call grid.BeginInsert();
Then on some custom logic, i want to cancel insert. I call grid.CancelEdit() since CancelInsert() doesn't exists, but the grid doesn't delete that item that appears on BeginInsert().
Watch the attachment.
5 Answers, 1 is accepted
0
Hello Matjaz Cof,
Like in your other post RadGridView.ActionOnLostFocus property is taken into account when you click outside the grid and new row is actually committed before CancelEdit() call. If you want to control commit and cancel from outside buttons just set this property to "None".
Best wishes,
Nedyalko Nikolov
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.
Like in your other post RadGridView.ActionOnLostFocus property is taken into account when you click outside the grid and new row is actually committed before CancelEdit() call. If you want to control commit and cancel from outside buttons just set this property to "None".
Best wishes,
Nedyalko Nikolov
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.
0
0
Hi Matjaz Cof,
As I understand you want to stop user from editing except maybe for the new added item. In order to achieve this you can use RadGridView.RowEditEnded event. I'm attaching a modified version of your example which demonstrates this approach. Let me know if this does not help.
Sincerely yours,
Nedyalko Nikolov
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.
As I understand you want to stop user from editing except maybe for the new added item. In order to achieve this you can use RadGridView.RowEditEnded event. I'm attaching a modified version of your example which demonstrates this approach. Let me know if this does not help.
Sincerely yours,
Nedyalko Nikolov
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.
0
Edo Cof
Top achievements
Rank 1
answered on 18 Apr 2010, 10:57 AM
Well you don't understand.
I want to be grid ReadOnly all the time, because i edit data in seperate form.
I only change readonly property, so that i can get edit indicator and Add indicator from row.
I want to be grid ReadOnly all the time, because i edit data in seperate form.
I only change readonly property, so that i can get edit indicator and Add indicator from row.
0
Hi Matjaz Cof,
This means that you do not want to edit data via RadGridView. Then you can modify underlying data source directly to meet your goals. The idea is simple add item into underlying data source (if it is a collection that implements INotifyCollectionChanged interface item will be added into RadGridView automatically), scroll to this item and set its "IsInEditMode" property to true (this will add editing indicator in front of the row). Unfortunately you have to handle Commit and Cancel edit also. I'm attaching a modified version of the sample project that demonstrates this approach. Let me know how this works on your end.
Best wishes,
Nedyalko Nikolov
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.
This means that you do not want to edit data via RadGridView. Then you can modify underlying data source directly to meet your goals. The idea is simple add item into underlying data source (if it is a collection that implements INotifyCollectionChanged interface item will be added into RadGridView automatically), scroll to this item and set its "IsInEditMode" property to true (this will add editing indicator in front of the row). Unfortunately you have to handle Commit and Cancel edit also. I'm attaching a modified version of the sample project that demonstrates this approach. Let me know how this works on your end.
Best wishes,
Nedyalko Nikolov
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.