Update Function is not working anymore

2 posts, 0 answers
  1. Rasid
    Rasid avatar
    5 posts
    Member since:
    Oct 2011

    Posted 07 Mar 2016 Link to this post

    I'm using RIA Services, Silverlight 5.0, and Telerik for Silverlight v2014.3.1402.1050..
    I got this error when I want to update an item using Ria Services 

    The property 'Id' is part of the object's key information and cannot be modified.

    private void SetPolygonRange()
        var context = new ObjectContext();
        var rangeName = PolygonRangeNameComboBox.Text;
        var query = context.GetPolygonRangesByNameQuery(rangeName);
        context.Load(query, UpdatePolygonRange, context);
    private void UpdatePolygonRange(LoadOperation<PolygonRange> lo)
        var range = lo.Entities.First();
        range.Name = "New Name";
        var context = (ObjectContext) lo.UserState;

    PolygonRange is only ID and Name. I dont update the primary key here, but the error tell me that I can't update the primary key.
    Previously, it works well (in windows 8 and SQL Server 2010).

    Then I update to windows 10 and SQL Server 2012, and all of updates function is not working anymore. I'm not sure that the OS update have anything to do with the error.

    I'm not sure which one that cause this error.
  2. Yana
    Yana avatar
    4942 posts

    Posted 10 Mar 2016 Link to this post

    Hi Rasid,

    This seems as a general Silverlight question and is not related to any of our Silverlight controls, that's why I'd suggest you post it either on MSDN forums or StackOverflow.

    If you have any concrete questions or issues regarding the controls from UI for Silverlight suite, we will be glad to help.

    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top