private void button2_Click(object sender, EventArgs e) { if (editor1.BodyHtml != null) { string edit_title = textBox2.Text.ToString(); string edit_role = comboBox2.Text.ToString(); string edit_desc = editor1.BodyHtml.ToString(); int id = dataGridView1.CurrentCell.RowIndex; dataGridView1.CurrentRow.Cells[1].Value = edit_title; dataGridView1.CurrentRow.Cells[2].Value = edit_role; dataGridView1.CurrentRow.Cells[3].Value = edit_desc; dataGridView1.UpdateCellValue(1, id); dataGridView1.UpdateCellValue(2, id); dataGridView1.UpdateCellValue(3, id); textBox2.ResetText(); comboBox2.ResetText(); editor1.Clear(); dataGridView1.Refresh(); } try { cmdbl = new SqlCommandBuilder(adap); adap.Update(ds, "CreatedJobs"); MessageBox.Show("Job has been Updated!", "Update", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)