custom attributes when using xml

3 posts, 1 answers
  1. Neil
    Neil avatar
    3 posts
    Member since:
    Apr 2006

    Posted 18 Apr 2008 Link to this post


    It looks like the custom attributes don't get set any-more when using (for example):

    a node from my XML string looks like:
    <Node ImageUrl="~/images/TaskRes.gif" Text="the task" Value="{9400594D-10D0-426D-813E-84B9E3811587}" Category="rstrt" Expanded="true">

    I want to be able to later access the attribute 'Category'.  This all last worked in the RadControls 2007 Q3 classic version, why not now?


    ps. I've also tried using treeView.LoadXml(newDoc.OuterXml), same result!
  2. Answer
    Atanas Korchev
    Atanas Korchev avatar
    8462 posts

    Posted 18 Apr 2008 Link to this post

    Hi Neil,

    Category is a property of the node object so you should access it that way. Custom attributes are created only for XML attributes which do not have corresponding RadNode properties.

    I hope this helps,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Feizal Amlani
    Feizal Amlani avatar
    91 posts
    Member since:
    Feb 2007

    Posted 15 Apr 2009 Link to this post


    I am loading a XML string into the TreeView like so...
    <Tree><Node id="myuniqueid" anotherid="anotheruniqueid" EnableContextMenu='false' Text='MyText' Value='1' Checkable='false'></Node></Tree>

    It seems that when I  bind the XML to the Tree like PHTreeView.LoadXml(sb.ToString) the "id" is not part of the attributes collection.  However, "anotherid" is added correctly.

    I need to do this in the attributes collection as I am using the Tooltip control as well and need to set the Target property of the TooltipManager.  It uses the "id" attribute.


Back to Top