【发布时间】:2011-05-19 20:43:44
【问题描述】:
我有一个从设计时定义的 sql 数据源填充的 gridview,我已经将 sqldatasource 配置为选择、更新和删除,我的表中有一个标题字段,它是主键,它工作正常并且也更新了记录.直到我删除了boundfields并放置了templatefield和itemtemplate。之后我收到一条错误消息:
You have specified that your update command compares all values on SqlDataSource 'SqlDataSource1', but the dictionary passed in for oldValues is empty. Pass in a valid dictionary for update or change your mode to OverwriteChanges.
如果我使 ConflictDetection = "OverwriteChanges" 它工作正常但不更新.. itemtemplate 的要求是因为我想显示新记录的页脚模板并将默认的编辑和删除按钮更改为 imagebutton...
我应该如何使用 itemtemplate 使其工作...
【问题讨论】:
标签: asp.net gridview sqldatasource