怎么样才能让 datagrid 里的数据强制更新到DATASET 中 ?
ds = new DataSet();
oda.Fill(ds,"secufile");
this.dataGrid1.DataSource = ds.Tables["secufile"] ;
dataGrid1.SetDataBinding(ds,"secufile");
现在有这样的一个问题,就是要如果我在DATAgrid 中插入一行并填写数据,填写完成之后如果我不点击其它行,此时数据并没有更新到 DS中 , 如果我点击其它行或都是让datagrid1失去焦点, 则数据就会更新的DS中;这种问题如果处理?
解决方案 »
- 求助!用存储过程做二级分类
- 问个概念上的问题,谢谢!
- openfiledialog选定的内容如何插入到Datagridview中
- .net下如何java调用的dll?
- 在 System.Data.SqlClient.SqlException 中第一次偶然出现的“System.Data.dll”类型的异常
- 请给我指路:做了两年C++.现在想转学C#.有什么困难?会不会学不会哦!(因为我已经熟悉了C++的那种设计模式了).(再线等!!40分后揭贴.请有这种
- 请教关于C#的一个问题
- 能否将一个WINFROM窗体类,设计为一个static的,
- winform Telerik raggridview 过滤条件 以及过滤中的这些文本如何设置成中文
- (在线等待).Net里如何实现象com+里的那种事务,不用com+实现
- 请教工作流图形化界面的开发问题
- 关于加密狗,safenet
this.bandedGridView1.PostEditor();
试一下
bandedGridView 这是什么对象 !
public void AcceptChange()
{
if(this.DataSource == null) return;
if(this.Visible == false) return; BindingManagerBase bm=this.BindingContext[this.DataSource,this.DataMember];
if(bm.Position==-1)return;
try
{
int row = this.CurrentCell.RowNumber;
this.CurrentCell = new DataGridCell(row + 1,this.CurrentCell.ColumnNumber);
this.CurrentCell = new DataGridCell(row,this.CurrentCell.ColumnNumber);
}
catch(Exception ex)
{}
}
所有的人