sree hari

sree hari

  • NA
  • 29
  • 11.2k

how to bind multiple images to tree node.

Nov 14 2010 8:09 AM
Hi Guys,

how to bind multiple images  to tree node.

i can bind one image using IMAGE URL property... ..i need implement edit,save,delete images to tree view parent and child nodes.

if (ds.Tables[0].Rows.Count > 0)
            {
                TreeView1.Nodes.Clear();
                foreach (DataRow masterRow in ds.Tables[0].Rows)
                {
                    TreeNode masterNode = new TreeNode((string)masterRow["ParentName"], Convert.ToString(masterRow["ParentId"]), "~/Images/xxx.bmp");
                    TreeView1.Nodes.Add(masterNode);
                   

                    foreach (DataRow childRow in masterRow.GetChildRows("Children"))
                    {
                        TreeNode childNode = new TreeNode((string)childRow["ChildName"], Convert.ToString(childRow["ParentId"]));
                        childNode.ImageUrl = "~/Images/yyy.bmp";
                        masterNode.ChildNodes.Add(childNode);
                    }


                }
            }


Answers (2)