如何在wpf中保存较新的数据网格的旧值. [英] How to save the older value of data grid following with newer one in wpf.
本文介绍了如何在wpf中保存较新的数据网格的旧值.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
我是WPF的新手,正在使用数据网格.在一个按钮旁边有一个添加的展览品,通过该展览品,人们可以通过其本地计算机输入值.
一切正常,但是出现了问题,因为当我用来将新值馈送到网格时,前一个丢失了,而新值代替了旧值.
我希望较旧的值应保持在较新的值之后.
请有人帮帮我.
解决方案
除了将新值分配给数据网格外,您还可以执行以下操作:
1.获取数据网格的当前内容
2.将获取的内容添加到新值
3.将更新的值分配给数据网格
现在,您将在数据网格中获得旧值和新值
Hi
I am new in WPF and I''m using a data grid. Beside one button there is add exhibit through which one can feed the value through their local machine.
All working fine but the problem arises as when I use to feed the new value to the grid, the previous one is lost and the new value comes in place of the older one.
I want that the older value should remain following the newer one.
Please someone help me out.解决方案Instead of assigning the new value to data grid, you can do the following:
1. Fetch the current content of data grid
2. Add the fetched content to the new value
3. Assign the updated value to data grid
Now, you will have the old + new value in data grid
这篇关于如何在wpf中保存较新的数据网格的旧值.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文