Hello there,
I have to cancel a deleted line in the MyGirdView_Deleted (related to Referential Integrity). The line is deleted in the Grid but not in my database (I use the RejectChanges method). So I need to refresh my GridView. I try the MyGridView.Rebind() to reflect the exact content of my DomainService but nothing append. I use RadDataPager to control everthing.
This is my code :
private void MyGirdView_Deleted(object sender, Telerik.Windows.Controls.GridViewDeletedEventArgs e)
{
ActionsDomainContext ctx = (ActionsDomainContext)actionsDomainDataSource.DomainContext;
ctx.SubmitChanges(o =>
{
if (o.HasError)
{
MessageBox.Show("Cannot be deleted", "Cancel", MessageBoxButton.OKCancel);
o.MarkErrorAsHandled();
ctx.RejectChanges();
MyGridView.Rebind();
}
}, null);
}
Any clue will be appreciate. Thank you
I have to cancel a deleted line in the MyGirdView_Deleted (related to Referential Integrity). The line is deleted in the Grid but not in my database (I use the RejectChanges method). So I need to refresh my GridView. I try the MyGridView.Rebind() to reflect the exact content of my DomainService but nothing append. I use RadDataPager to control everthing.
This is my code :
private void MyGirdView_Deleted(object sender, Telerik.Windows.Controls.GridViewDeletedEventArgs e)
{
ActionsDomainContext ctx = (ActionsDomainContext)actionsDomainDataSource.DomainContext;
ctx.SubmitChanges(o =>
{
if (o.HasError)
{
MessageBox.Show("Cannot be deleted", "Cancel", MessageBoxButton.OKCancel);
o.MarkErrorAsHandled();
ctx.RejectChanges();
MyGridView.Rebind();
}
}, null);
}
Any clue will be appreciate. Thank you