Remove not working

5 posts, 0 answers
  1. Cheri
    Cheri avatar
    21 posts
    Member since:
    Jan 2012

    Posted 21 Jun 2012 Link to this post


    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
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 21 Jun 2012 Link to this post

    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 >>

  3. DevCraft banner
  4. Cheri
    Cheri avatar
    21 posts
    Member since:
    Jan 2012

    Posted 21 Jun 2012 Link to this post


    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)
  5. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 21 Jun 2012 Link to this post

    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 >>

  6. Cheri
    Cheri avatar
    21 posts
    Member since:
    Jan 2012

    Posted 21 Jun 2012 Link to this post

    I just upgraded to 2012.2.607.1050 and am still getting the same results....
Back to Top
DevCraft banner