如果我们在gridiew中输入重复记录,则意味着第二个替换了第一个 [英] if we enter duplicate record in gridiew means the second replace the first
本文介绍了如果我们在gridiew中输入重复记录,则意味着第二个替换了第一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
海,
如果我们在gridiew中输入重复记录,则意味着第二个替换了第一个
即产品名称数量
笔1
笔2
同样.
然后在gridview中应该替换第一条记录
即它应该只显示为钢笔2
任何想法将不胜感激.
Hai,
if we enter duplicate record in gridiew means the second replace the first
ie productname quantity
pen 1
pen 2
likewise.
then in gridview it should replace the first record
ie it should display as pen 2 only
any ideas would be appreciated.
推荐答案
这里的问题是,您必须在网格视图中使用插入.不要插入用户编辑内容并更新现有值.当您插入一个单独的条目在Db中.我还以为主键要么不存在,要么可能不是笔和数量以外的其他列.
The problem here is that you must be using the insert into grid-view. Don''t do insert user edit and update the existing value. when you insert a separate entry is made in the Db. I am laso thinking that the primary key is either non existent or perhaps some other column than pen and quantity.
这篇关于如果我们在gridiew中输入重复记录,则意味着第二个替换了第一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文