Search code examples
silverlightwcf-ria-services

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.

In My domain service of cource enable Modification on my several tables

I drop on my Silverlight app a Datagrid that fetch data on my table (let's call it tblCustomer for the example)

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;


Solution

  • 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.

    Note: If you're attempting to use MVVM - do same within ViewModel instead code-behind.