private void btnUpdate_Click(object sender, EventArgs e) { if (grvData.CurrentRow == null) { return; } Models.students selectedRow = (Models.students)grvData.CurrentRow.DataBoundItem; Views.students updateForm = new Views.students(selectedRow); updateForm.Show(); }
private void btnAdd_Click(object sender, EventArgs e) { // Show add form of table Views.students frmAdd = new Views.students(); frmAdd.Show(); }