Question

I was wondering what would be the best way to insert a row into my sql table through WPF application window. I have two wpf DataGrids in my application, and I want the user to be able to push a button and insert data into the grid from there (inserting data into the sql table and refresh the grid when the user closes the pop-up window after inserting). I´m using a DataSet database model and running .sdf database inside my application.

I´m using a TableAdapter to fill my DataGrid:

    HomeApplication.TheHomeApplicationDBDataSet theHomeApplicationDBDataSet;
    HomeApplication.TheHomeApplicationDBDataSetTableAdapters.AccountingTableAdapter  homeApplicationDataSetAccountingTableAdapter;

What is the best way to do this? Any ideas would help. thx :)

Was it helpful?

Solution

WPF doesn't help you for data acces. So you can do something like that northwindDataSet1.Customers.Rows.Add(newCustomersRow);

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top