Maybe you can try for a temporary fix for your project meanwhile. Since you said that you are indeed able to delete the records from DB. Now what you got to do is somehow refresh the contents of the datagrid. On taking a wild guess by just dynamically refreshing
the page or any other way of updating the grids contents could probably do the trick.
Fazal
Knowledge Shared Is Knowledge Gained
www.fazal.wordpress.com
Please remember to mark the replies as answers if they help
I had the same problem, and Jeff Handley confirmed that this is indeed a bug in the DomainDataSource control. The best workaround that I could come up with is to detach the record from the DomainDataSource, which will immediately remove it from your dataset
and datagrid, and then just create a new datacontext to perform the actual delete. Something like this...
fashai
Contributor
2105 Points
458 Posts
Re: Re: Re: DomainDataSource deleting data
Aug 13, 2009 09:11 AM | LINK
Maybe you can try for a temporary fix for your project meanwhile. Since you said that you are indeed able to delete the records from DB. Now what you got to do is somehow refresh the contents of the datagrid. On taking a wild guess by just dynamically refreshing the page or any other way of updating the grids contents could probably do the trick.
Knowledge Shared Is Knowledge Gained
www.fazal.wordpress.com
Please remember to mark the replies as answers if they help
pwrgrv
Member
20 Points
15 Posts
Re: DomainDataSource deleting data
Oct 18, 2009 10:11 PM | LINK
I had the same problem, and Jeff Handley confirmed that this is indeed a bug in the DomainDataSource control. The best workaround that I could come up with is to detach the record from the DomainDataSource, which will immediately remove it from your dataset and datagrid, and then just create a new datacontext to perform the actual delete. Something like this...
ddsExistingRecords.DomainContext.Entities.GetEntityList<[entity type]>().Detach(deleteRecord); [domain context] oData = new [domain context](); oData.[entity type].Attach(deleteRecord); oData.[entity type].Remove(deleteRecord); oData.SubmitChanges();(Replace everything in the square braces with your project's types.)
mrcuxu
Member
2 Points
1 Post
Re: Re: DomainDataSource deleting data
Dec 30, 2009 03:58 AM | LINK
I love u pwrgrv
i had the same problem. and it solved by your solution.
tks.
Enan
Member
8 Points
4 Posts
Re: DomainDataSource deleting data
Oct 07, 2010 09:36 AM | LINK
Hi pwrgrv,
ddsExistingRecords.DomainContext.Entities.GetEntityList<[entity type]>().Detach(deleteRecord);
it is not working with me, I'm using vb.
please help.
Enan
pwrgrv
Member
20 Points
15 Posts
Re: DomainDataSource deleting data
Oct 11, 2010 03:26 PM | LINK
What version of Silverlight / Visual Studio are you using? Also, please include the error code.
Enan
Member
8 Points
4 Posts
Re: DomainDataSource deleting data
Oct 12, 2010 08:06 AM | LINK
Hi pwrgrv,
Thanks, I already got it running.
I've question regarding connecting to Oracle Database 8i from Silverlight 4.
How to do that?
I've created a childwindow page and I want to validate first if the User exist in our Oracle Database Server
before he can get inside the system.
please help.
thanks,
Enan