Current filter:
                                You should refresh the page.
                                Support Center
                                  • How do I save changes made to the currently edited grid row without moving to another row?

                                1 Solution

                                Creation Date Rating Importance Sort by

                                Our GridControl automatically saves all the introduced changes when it loses focus, when focus is moved to another row or a new view is focused.

                                On the other hand, to ensure that all the introduced changes are posted to the underlying source when switching between cells in the same row, it is necessary to invoke the PostEditor and UpdateCurrentRow methods. 
                                You can invoke these methods, for instance, when you need to save the changes on a button click. 
                                It is also possible to prevent a form from being closed if the introduced changes aren't acceptable. For this, simply check the following condition in the Form.FormClosing event handler and set the e.Cancel parameter to true if this condition is satisfied:

                                if (!(View.PostEditor() && View.UpdateCurrentRow()))


                                If Not (View.PostEditor() AndAlso View.UpdateCurrentRow()) Then


                                void Form_FormClosing(object sender, FormClosingEventArgs e) { e.Cancel = !(View.PostEditor() && View.UpdateCurrentRow()); }


                                Private Sub Form_FormClosing(ByVal sender As Object, ByVal e As FormClosingEventArgs) e.Cancel = Not (View.PostEditor() AndAlso View.UpdateCurrentRow()) End Sub

                                See also:
                                Posting Data to a Connected Database 

                                If you need additional product information, write to us at or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2017 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners