Ticket Q378266
Visible to All Users

How to save changes from the GridControl to database

created 12 years ago (modified 12 years ago)

Hi,
I have a question
How can i save changes from the GridControl to database ?

thanks very much

Answers approved by DevExpress Support

created 12 years ago (modified 12 years ago)

Hi,
Our GridControl is intended to represent and edit data from a data source. So, you can use your data source' methods to save changes from it to the related database. Please review our Posting Data to a Connected Database help article for additional information.
Let us know whether or not this approach suits your needs. If it is not helpful for you, please describe your scenario in greater detail (specify your data source type and provide other details).

    Other Answers

    created 12 years ago (modified 12 years ago)

    thank you for your answer first i want to want to make change in this GridControl but i don't know how ?
    i'm using EntityFramework 5 :
     var client = from c in entities.client
    select new { Code = c.code, c.nom,Telephone=c.telephone,Ville=c.ville,Pays=c.pays, };
    gridControl1.DataSource = client.ToList();

      Comments (3)
      DevExpress Support Team 12 years ago

        Hi,
        I have attached a sample project to my previous answer. In this sample, you can edit information in the grid and post changes to the underlying database.
        If this does not meet your requirements, please provide us with a sample project that illustrates your scenario.

          Thanks a lot Nikita you were helpful

          DevExpress Support Team 12 years ago

            You are welcome. Please contact us if you need further assistance.

            Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

            Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.