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

i get error in this code 'does not contain a definition for 'Attributes'

1 Answer 140 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mohamed
Top achievements
Rank 1
Mohamed asked on 16 Feb 2014, 04:47 PM
  RadTreeNode node = new RadTreeNode();
                rdTvSearch.Nodes.Clear();
                string url = string.Empty;
                foreach (DataRow row in MyDataTable.Rows)
                {// and this check if send a PID , or a parent id to make fileration.
                    // if (row["ParentID"] == DBNull.Value || parentid != null) //That the regular case when loading the tree with the Level one parent , that dunt has any parent.
                    //{
                    if (row["IsChild"].ToString() == "True")
                    { node.Image = TechTouch_Point.Properties.Resources.file2; }
                    else
                    { node.Image = TechTouch_Point.Properties.Resources.folder1 ; }
                    node = new RadTreeNode(row["NameArabic"].ToString() + ' ' + "_" + ' ' + row["Number"].ToString(), row["ID"].ToString());
                    node.Attributes.Add("number", row["Number"].ToString());

                 //   node.ExpandMode = TreeNodeExpandMode.ServerSideCallBack;
                    node.Expanded = true;
                    node.Attributes.Add("name", row["NameArabic"].ToString());
                    node.Attributes.Add("child", row["IsChild"].ToString());
                    node.Attributes.Add("treenameid", treenameId.ToString());
                    
                    rdTvSearch.Nodes.Add(node);

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 18 Feb 2014, 12:40 PM
Hi Mohamed,

Thank you for writing. 

RadTreeNode does not have an Attributes property/collection. If you share with me what you want to use it for, I will try to provide you with a suggestion for your case.

I am looking forward to your reply. 

P.S. FYI the other thread which you have opened regarding the same case ("how i add attribute to node ?") was deleted due to duplicity. 

Regards,
Stefan
Telerik
Tags
General Discussions
Asked by
Mohamed
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or