请教;怎么样在dataGrid中删除当前行 如果你的datagrid带有头,用鼠标点中,按del就可以了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 1.ds.Tables[""].Rows.RemoveAt([this.dataGrid1.CurrentRowIndex]);2.this.dataGrid1.BindingContext[this.dataGrid1.DataSource,this.dataGrid1.DataMember].RemoveAt(this.dataGrid1.CurrentRowIndex); int RowNumber=this.datagri1.CurrentCell.RowNumber;myDataSet.Tabales[0].row[RowNumber].delete(); 再调用this.datagrid1.DataSource=myDataSet.Tables[0].DefaultView; 给分吧:假设dg0是你的datagrid,绑定的数据源dt0删除一行:if (dg0.CurrentRowIndex>=0){ dt0.Rows.Remove(dt0.Rows[dg0.CurrentRowIndex]); dt0.AcceptChanges();} 怎样验证一个IP和端口是不是代理IP U盘插电脑上有进程吗? Linq to sql Sto SqlDateTime发生溢出,如何处理? 定时程序的问题! 散分 100 并 询问这样的开发框架有没有价值 DATATABLE过滤问题 时间差的问题 两个菜问题 如何保存为BMP格式的图像文件? 关于 Thread 有没有人装过 Delphi 8 啊???是不是有 .Net 的控件??? C#
2.this.dataGrid1.BindingContext[this.dataGrid1.DataSource,this.dataGrid1.DataMember].RemoveAt(this.dataGrid1.CurrentRowIndex);
myDataSet.Tabales[0].row[RowNumber].delete();
假设dg0是你的datagrid,绑定的数据源dt0
删除一行:
if (dg0.CurrentRowIndex>=0)
{
dt0.Rows.Remove(dt0.Rows[dg0.CurrentRowIndex]);
dt0.AcceptChanges();
}