Skip to content
This repository was archived by the owner on Nov 28, 2024. It is now read-only.

Commit 46ef145

Browse files
authored
Merge pull request #513 from Zofware/EditingService-typo
Fix copy/paste bug in EditingService.cs
2 parents 454cec6 + 4eb795c commit 46ef145

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Controls/Grid/Grid.UWP/View/Services/Editing/EditingService.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Linq;
44
using System.Text;
@@ -85,7 +85,7 @@ public bool BeginEdit(ItemInfo rowInfo)
8585
this.Owner.EditRowLayer.ScheduleFirstEditorForFocus();
8686
}
8787

88-
this.Owner.Model.CurrentDataProvider.CommitEditOperation(this.EditItem);
88+
this.Owner.Model.CurrentDataProvider.BeginEditOperation(this.EditItem);
8989

9090
// hide the CurrentItem decoration
9191
this.Owner.visualStateService.UpdateCurrentDecoration(-1);
@@ -189,19 +189,20 @@ public bool CancelEdit(ActionTrigger trigger)
189189
this.Owner.EditRowLayer.EditorLayoutSlots.Clear();
190190
}
191191

192-
this.Owner.Model.CurrentDataProvider.CommitEditOperation(this.EditItem);
192+
this.Owner.Model.CurrentDataProvider.CancelEditOperation(this.EditItem);
193193
})
194194
{
195195
Flags = UpdateFlags.AffectsContent
196196
};
197197

198-
this.Owner.updateService.RegisterUpdate(update);
199-
200198
foreach (var pair in this.operation.OriginalValues)
201199
{
202200
pair.Key.SetValueForInstance(this.operation.EditItemInfo.Item, pair.Value);
203201
}
204202

203+
this.Owner.updateService.RegisterUpdate(update);
204+
205+
205206
if (this.operation.EditMode == DataGridUserEditMode.Inline)
206207
{
207208
this.Owner.EditRowLayer.EditorLayoutSlots.Clear();

0 commit comments

Comments
 (0)