简体   繁体   English

Silverlight + WCF RIA服务:插入新数据

[英]Silverlight + WCF RIA service: Insert new data

My question look stupid... but let's ask: 我的问题看起来很愚蠢...但是让我们问:

I'm developing a Silverlight website... Data are on the server and I use WCF RIA and Linq to Entities to attack my data. 我正在开发一个Silverlight网站...数据在服务器上,我使用WCF RIA和Linq to Entities攻击我的数据。

In My domain service of cource enable Modification on my several tables 在我的cource域服务中,在我的几个表上启用修改

I drop on my Silverlight app a Datagrid that fetch data on my table (let's call it tblCustomer for the example) 我在Silverlight应用程序上放置了一个Datagrid来获取表中的数据(在示例中,我们将其称为tblCustomer)

I've several webcast showing how easy it is to fetch data, update data BUT 我进行了几场网络广播,展示了获取数据,更新数据但多么简单

I don't know how to INSERT data!!! 我不知道如何插入数据!!!

My grid is in edit mode.. but I'm not able to add a new row... and if I use the detail view.. it's the same... 我的网格处于编辑模式..但是我无法添加新行...并且如果我使用局部视图..也一样...

Any one could provide help 任何人都可以提供帮助

Regards; 问候;

For adding new item you should do it manually: add button within which create and add new Item to collection that you're representing in DataGrid and you'll get new item in grid. 要添加新项目,您应该手动进行:添加按钮,在其中创建新项目并将其添加到要在DataGrid表示的集合中,然后将在网格中获取新项目。

Note: If you're attempting to use MVVM - do same within ViewModel instead code-behind. 注意:如果您尝试使用MVVM,请在ViewModel执行相同操作,而不要在代码后进行隐藏。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM