日期:2014-05-18 浏览次数:20804 次
private System.Data.DataRow GetCurrentRow(System.Windows.Forms.DataGridView pdg) { try { if (pdg.DataSource == null) return null; int iIndex =Convert.ToInt32(pdg.CurrentRow); if (iIndex == -1) return null; System.Data.DataTable dt = (DataTable)(pdg.DataSource); return dt.Rows[iIndex]; } catch { return null; } }