This repository was archived by the owner on Nov 28, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Controls/Grid/Grid.UWP/View/Services/Editing Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1- using System ;
1+ using System ;
22using System . Collections . Generic ;
33using System . Linq ;
44using 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 ( ) ;
You can’t perform that action at this time.
0 commit comments