private void btnNew_Click(object sender, EventArgs e)
 {
     frmStudentDetail = new frmStudentDetail();
     frmStudentDetail.newMode();
     frmStudentDetail.ShowDialog();
     RetrieveData();
 }
        private void GGC_TableControlCellDoubleClick(object sender, GridTableControlCellClickEventArgs e)
        {
            //Notify the double click performed in a cell
            Record rec = GGC.Table.DisplayElements[e.TableControl.CurrentCell.RowIndex].ParentRecord;

            //If(rec) IsNot Nothing Then
            if (rec != null)
            {
                frmStudentDetail       = new frmStudentDetail();
                frmStudentDetail.stdID = (int)rec.GetValue("std_ID");
                frmStudentDetail.viewMode();
                frmStudentDetail.ShowDialog();
            }
        }
 private void btnDelete_Click(object sender, EventArgs e)
 {
     if (currentCellIndex < 0)
     {
         MessageBoxAdv.Show("¡ÃسÒàÅ×Í¡¢éÍÁÙÅã¹µÒÃÒ§¡è͹·ÓÃÒ¡ÒÃ!", "ÃÒ§ҹ¤ÇÒÁ¼Ô´¾ÅÒ´", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         GGC.Focus();
     }
     else
     {
         frmStudentDetail = new frmStudentDetail();
         frmStudentDetail.editMode();
         frmStudentDetail.deleteData();
         currentCellIndex = -1;
     }
     RetrieveData();
 }