Some Tips When handle Dataset in VS 2005


Visual Studio 2005中文版还没出来,往往遇到一些提示,却无所适从,呵呵,记录之。


Concurrency violation: the UpdateCommand affected 0 of the expected 1 records
 
并发冲突
 
仔细检查Row的每个字段的变化情况。
 
Concurrency violation
 
Check the changes of every columns in the row.


DataSet Changes, while BindingSource Remains.
设计状态将BindingSource的DataSource属性设置为一个DataSet,并将其DataMember属性设置为DataSet中的一个表。
 
运行状态更改了DataSet,BindingSource并未随之改变,需要重新进行上面的设置。
 
 
Set the DataSource of BindingSource to a DataSet, and set it's DataMember attribute to the name of a DataTable in the DataSet.
 
While the DataSet is changed in running mode, the BindingSource do not change subsequently. Above settings in running mode are needed.


How to: DataGridView Cell Value Displayed in Percent Format
 
将列的DataGridViewCellStyle的Forma属性设置为"P2"(百分数老保留两位小数)。
 
我们知道如果设置DataFormatString的时候,应该设置为"{1:P2}",但是在设置DataGridViewCellStyle的Forma属性时需要指定为"P2"。
 
 
Set the Format attribute of the DataGridViewCellStyle to "P2" (2 fractions reserved).
 
As we know, when we set the value of DataFormatString, it should be "{1:P2}". But if it is for the Format attribute of a DataGridViewCellStyle, it should be set to "P2".


Deleted row information cannot be accessed through the row.
Deleted row information cannot be accessed through the row.
无法通过行访问已删除的行信息。
 
可能的原因:
一个DataRow已经被从DataTable中删除,然后又尝试获取DataRow(本身或字段值等)。
 
Reason:
Delete a DataRow from a DataTable and try to retrieve the row(the row itself or its fields' information).

13.gif

转载于:https://www.cnblogs.com/waxdoll/archive/2006/01/18/319868.html

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值