Home > View Post

RIA/JS: Deleting Entities

I got an e-mail from somebody who had watched the first few screencasts and wanted to know about deletes. Seemed like a good topic for our next screencast so here it is: Deleting with client-side change tracking:

Here’s the source as it’s entered into the console (plus the part that creates the array and datasource that I embed in the page).

var contacts = [];
var ds = $([contacts]).dataSource({
  serviceUrl: '/RiaJs-Demo1-ContactService.svc',   
queryName: 'GetContacts',  
bufferChanges: true }); ds.refresh();
// should output "ClientDeleted"
ds.getEntityState(contacts[1]); // deletes from the DB
// and removes the item from the array


Next time I hope to start working with some UI!

Josh Post By Josh Twist
9:47 PM
17 Oct 2011

» Next Post: Project Liike
« Previous Post: Building SPA Applications - the webcasts

Comments are closed for this post.

Posted by LeeHyungGeun @ 18 Oct 2011 1:16 PM
thank you answer.

it's very hot !!

© 2005 - 2022 Josh Twist - All Rights Reserved.