Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2730
UltraGrid: Saving Data to database after modifying row in the grid
posted

I am struggling trying to save the data to the database. Can someone assist me please.

 

 private void SaveUltraButton_Click(object sender, EventArgs e)
    {
      this.ultraGrid1.UpdateData();
     
      this.SaveUltraButton.Enabled = false;

    }

Parents
  • 53790
    posted

    Hello Keith,

     

    Could you please provide me more details about your approach that you are using to connect and load data from DataBase.  Are you using  Entity Data Model  or  TableAdapter and DataSet or something else?

     

    I made small sample that implements TableAdapter and DataSet. Could you please take a look at the attached sample. There are SQL script that creates a  table and inserts some rows. If you want to apply your changes in database, you could use the Update method of your TableAdapter. For example:

     

    private void ultraButton1_Click(object sender, EventArgs e)

    {

        ultraGrid1.UpdateData();

        this.dbRowsTableAdapter.Update(this.testDataSet);

        ultraButton1.Enabled = false;

    }

     

    Please take a look in the code for more details.

     

    Please let me know if I misunderstood your scenario or if you have any questions.

     

    Regards

    UltraGridPerformance.zip
Reply Children