Posting Data to a Connected Database

在调用此方法之前,确保网格控件已保存对当前焦点行的所有更改(用户可能输入了新数据但忘记更新行)。为此,需要调用BaseView.PostEditor和ColumnView.UpdateCurrentRow方法。dataSet11对象代表一个DataSet实例,可以访问我们的表格。
摘要由CSDN通过智能技术生成
The .Net data model implies that a control bound to a database using DbDataAdapter and DataTable objects does not immediately post changes after they have been made. Instead, changes are accumulated in the DataTable and you have to manually call a specific method to update the database. The XtraGrid behaves in a similar way: changes you made while editing data (adding, deleting or modifying records) are saved in a corresponding DataTable. To post these changes to the database, you should call the data adapter's System.Data.Common.DbDataAdapter.Update method.

Before calling this method, make sure that the grid control has saved all the changes made to the currently focused row (the end-user could enter new data but forget to update the row). For this purpose, you need to call the

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值