Friday, May 21, 2010

Adding and Deleting from a RIAServices DomainDataSource

If you drag and drop a ‘Details’ form from the DataSources window onto a Silverlight form, by default you won’t have any add or save ability.  To fix this, you have to add buttons to the form to do the Insert and Delete.  The code behind for those buttons looks like this:

private void btnAdd_Click(object sender, RoutedEventArgs e)
    Web.Models.UserEdit newUser = new Web.Models.UserEdit();
private void btnDelete_Click(object sender, RoutedEventArgs e)

No comments:

Post a Comment