private void AssetForm_Load(object sender, EventArgs e) { //ACCESSORIES DATA GRID VIEW this.accessoriesTableAdapter.Fill(this.fAMDatabaseDataSet.Accessories); con.Open(); string accCommandText = "SELECT * from Accessories"; accAdapter = new OleDbDataAdapter(accCommandText, con); OleDbCommandBuilder accCB = new OleDbCommandBuilder(accAdapter); accView.AutoGenerateColumns = true; accDT = new System.Data.DataTable(); accAdapter.Fill(accDT); BindingSource accBS = new BindingSource(); accBS.DataSource = accDT; accView.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells); accView.DataSource = accBS; con.Close(); }
private void accEditButton_Click(object sender, EventArgs e) { accAdapter.Update(accDT); accView.Refresh(); MessageBox.Show("Asset Updated Successfully."); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)