Steps,
- Crate window application with single form
- add new datasource from Data->Add new Data source
- Goto Data->Show Data Source
- Drop any table to form. This step will add tow controls. a. DataGridView b. Binding Navigator
press F5 to run.
I am able to view all the records but not able to do add/update/delete.
Below is the code of the form that is generated by VS.
namespace TestingGrid
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void testBindingNavigatorSaveItem_Click( object sender, EventArgs e )
{
this.Validate();
this.testBindingSource.EndEdit();
this.testTableAdapter.Update( this.testDataSet.Test );
}
private void Form1_Load( object sender, EventArgs e )
{
// TODO: This line of code loads data into the 'testDataSet.Test' table. You can move, or remove it, as needed.
this.testTableAdapter.Fill( this.testDataSet.Test );
}
}
}