WPF Datagrid使用单元格编辑模式逐个添加行 [英] WPF Datagrid add rows one by one with cell editting mode

查看:349
本文介绍了WPF Datagrid使用单元格编辑模式逐个添加行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是WPF MVVM概念的新手。请帮助我。我想使用Datagrid输入详细信息。例如:如果我在Datagrid的第一列中选​​择项目代码,那么它将从数据库中获取并获取产品,价格和UOM详细信息的名称。按下后输入相同行中的数量总量将来到下一行将创建进入下一个项目。请帮助我紧急完成我的任务。

Hi, I am new to WPF MVVM concept. Please kindly help me. I want to use Datagrid for entering the details. Ex: If I select The Item Code in the First column of the Datagrid then it will fetch & get the name of the product, price and UOM details from database. After enter the quantity in that same row after pressing enter total amount will come and next row will create to enter next Item. Please help me It's urgent to finish my task.

推荐答案

你好,



它实际上取决于你的结构!!



你必须将GridControl与NotifyCollectionChange绑定,例如observalbleCollection或bindingList



你必须要求时间你想在网格控件中添加新行,

当你添加到集合时它会自动在GridControl中添加行





谢谢
hello,

its actually depend on your stucture !!

you have to bind GridControl with NotifyCollectionChange like observalbleCollection or bindingList

you have to deside the time when you want to add new row to grid control,
at that time when you add to collection it will autometically add row in GridControl

!
Thanks


这篇关于WPF Datagrid使用单元格编辑模式逐个添加行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆