Current filter:
                                You should refresh the page.
                                Support Center
                                  • I have a project using linq
                                    to sql query at runtime to retrieved data
                                    to datagrid view It works and function fine but can not save to database ro
                                    delete to database. Do you have a simple program to show me how to do that in

                                1 Solution

                                Creation Date Importance Sort by

                                Hi Farhad,
                                You want to save the data source changes made via our GridControl, right?

                                If so, refer to the following help article which contains all necessary information of how to accomplish this task:
                                How to Make Sure That All Modifications Are Saved

                                The main idea is to use the database's standard methods to save changes.

                                Using LINQ to SQL, the DataContext.SubmitChanges method serves for this purpose (refer to the How to: Submit Changes to the Database MSDN article for more information).

                                I suggest that you call this method in the GridView.RowUpdated event handler. Or choose another moment to save changes. For example, create a Save button and use its OnClick event handler for this purpose. Note that in this case it is necessary to call the PostEditor and UpdateCurrentRow methods as it is described at Posting Data to a Connected Database.

                                A similar issue has already been discussed in the how can i save changes from the GridControl to database thread.

                                Should you have further questions, feel free to contact us.

                                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-2018 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners