This is a migrated thread and some comments may be shown as answers.

Remove not working

4 Answers 83 Views
DomainDataSource
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Cheri
Top achievements
Rank 1
Cheri asked on 21 Jun 2012, 04:08 PM

Hello,

I have an domaindatasource defined in XAML that is not bound to any controls.  I use it to add items and delete items to a table in the database. 

<telerik:RadDomainDataSource Name="ddsAllRules" QueryName="GetAllRules" AutoLoad="True" SubmittedChanges="dds_SubmittedChanges">
    <telerik:RadDomainDataSource.DomainContext>
        <server:SSAssetsDomainContext />
    </telerik:RadDomainDataSource.DomainContext>
</telerik:RadDomainDataSource>

Adding an item works fine - it's the Remove that is not working.  Here is the code snippet:

private void btnDelete_Click(object sender, RoutedEventArgs e)
{
    var rule = new SSAssets.Web.Rule
    {
        RuleID = (string)rcbRule.Text, RuleType=(string)ddsRules.QueryParameters[0].Value
    };
 
    this.ddsAllRules.DataView.Remove(rule);
 
    //this.ddsAllRules.DataView.RemoveAt(0);
    this.ddsAllRules.SubmitChanges();
 
    ddsRules.Load();
 
}


I set a break in the delete method of the domainservice code but it never breaks.  When I use RemoveAt, it breaks and works as expected.  

Any help would be appreciated!

Cheri

4 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 21 Jun 2012, 04:50 PM
Hello Cheri,

 I have tested removing an item and it was deleted fine. What the result is if you remove the item from the Items collection of the RadGridView?

May I ask you to confirm if you have this problem with the latest binaries?

Kind regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Cheri
Top achievements
Rank 1
answered on 21 Jun 2012, 04:53 PM

Hello Didie,

It's not bound to a RadGridView - it's bound to nothing.  

And I think I have the latest binaries (2012.1.326.1050)
0
Dimitrina
Telerik team
answered on 21 Jun 2012, 04:56 PM
Hello Cheri,

 Actually this the version before the latest version. The latest one is RadControls for Silverlight Q2 2012 (2012.2.607.1050). Would you please try with them?

All the best,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Cheri
Top achievements
Rank 1
answered on 21 Jun 2012, 05:29 PM
I just upgraded to 2012.2.607.1050 and am still getting the same results....
Tags
DomainDataSource
Asked by
Cheri
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Cheri
Top achievements
Rank 1
Share this question
or