/// <summary> /// /// </summary> private void DeleteSelectRow() { //TODO: delete xgdata row // int row = dataGridXGData.CurrentRowIndex; if (row == -1) { return; } DialogResult dr = MsgBox.ShowQuestion(GT.TIP_DELELE_DATAGRID_ROW); if (dr == DialogResult.Yes) { int id = int.Parse(this.dataGridXGData [row, 0].ToString()); // XGDB.DeleteXGTask( id ); XGDB.DeleteXGData(id); DataTable tbl = (DataTable)this.dataGridXGData.DataSource; DataRow [] delRows = tbl.Select("xgdata_id = " + id); foreach (DataRow r in delRows) { tbl.Rows.Remove(r); } // XGDB.Resolve(); } }