Unable to edit the ID attribute of Telerik.Web.UI.RadTreeNode

4 posts, 0 answers
  1. Guest 27
    Guest 27 avatar
    2 posts
    Member since:
    Aug 2009

    Posted 25 Aug 2009 Link to this post

    Since we are updating the OS from 32bit to 64 bit, I had to change the reference from Telerik.WebControls to Telerik.Web.UI
    In Telerik.WebControls the following code worked fine.

     

    using Telerik.WebControls;

    RadTreeNode
    newNode = new RadTreeNode();

    newNode.ID = "1234";

    But with Telerik.Web.UI the following code throws a error

    using Telerik.Web.UI;

    RadTreeNode newNode = new RadTreeNode();

    newNode.ID = “1234”;

    Error:"Property or indexer 'Telerik.Web.UI.ControlItem.ID' cannot be assigned to -- it is read only"

    Is their a work around for this?

  2. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 26 Aug 2009 Link to this post

    Hello,

    That is true - the ID property is read only. Why do you need to set it?

    Greetings,
    Veselin Vasilev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Guest 27
    Guest 27 avatar
    2 posts
    Member since:
    Aug 2009

    Posted 26 Aug 2009 Link to this post

    One reason is, to consrtuct the tree.
  4. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 26 Aug 2009 Link to this post

    Hi ,

    You do not need to set that property anymore. Please omit it and create the nodes without setting the ID property.

    All the best,
    Veselin Vasilev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top