在datagrid中删除选中的行。
private void delete_Click(object sender, System.EventArgs e)
{
if(MessageBox.Show("你确定要删除这条基本信息吗?","用户您好",
MessageBoxButtons.OKCancel,MessageBoxIcon.Exclamation)==DialogResult.OK)
{
this.ds.Tables["个人基本信息"].Rows[1].Delete();
}
this.DataGirdDataBind();
}
在this.ds.Tables["个人基本信息"].Rows[1].Delete();中的Rows后面的RowNum应该我在datagrid中选中的那行的号码,那我应该怎么写呢?