Using SQL SERVER express, OleDBDataAdapter, Dataset, DataGridView, I need the user to be able to edit an entire record like this: User must first fill the datagridview by first applying a filter. He must enter a valid Project Number, then press FILTER to make data appear. This is the only way to fill the Datagridview.
Then, to make changes (UPDATE statement), he must click on the concerned row and that window appears with all the field filled with the row's data.
Here's how I apply the filter...
private void button1_Click_1(object sender, EventArgs e) { int iCnt; oleDbDataAdapter1.SelectCommand.Parameters[0].Value = RFIfilter.Text; rfIlogDS1.Clear(); iCnt = oleDbDataAdapter1.Fill(rfIlogDS1); if (iCnt > 0) { dataGridRFIlog.Enabled = true; } else { MessageBox.Show("Job Number Not Found"); dataGridRFIlog.Enabled = false; } }
I basically have no clue on how to make chosen data appear on the EDIT window, then make UPDATE statement upon clicking SAVE CHANGES....
private void dataGridRFIlog_CellClick(object sender, DataGridViewCellEventArgs e) { //opens up edit form filled with row's data, ready to be edited... }