Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
Displaying an Icon in a tree column of a UltraTree with OutlookExpress style view
posted

Hello,

I have an UltraTree which has a view style of OutlookExpress.

I dynamically create the tree and add the nodes to the first UltraTreeNodeColumn I have. That way I have the tree positioned in the left most column of the Grid. This column is defined as follows:


            UltraTreeNodeColumn TreeCol = new UltraTreeNodeColumn();
            TreeCol = new UltraTreeNodeColumn();
            TreeCol.Key = "Tree";
            TreeCol.Text = "Tree";
            TreeCol.MaxLength = 100;
            TreeCol.NullText = "NULL";
            TreeCol.AutoSizeMode = Infragistics.Win.UltraWinTree.ColumnAutoSizeMode.VisibleNodes;
            TreeCol.AllowSorting = DefaultableBoolean.True;
            TreeCol.DataType = typeof(string);
            ultratree1.ColumnSettings.RootColumnSet.Columns.Add(TreeCol);

As can be seen, the type of data this column receives is a string, i.e. the node's name.

My problem is that I am having trouble displaying an image / icon on the left hand side of the node's name. This feature was possible when the UltraTree was defined as standard for example and then the code below worked:

            node.Override.NodeAppearance.Image = _ImageList.Images["img"];

Now that my tree has an OutlookExpress look-and-feel the icons I initially defined do not appear any longer even though the code executes correctly.

What's the best way to add icons to the nodes in the  UltraTreeNodeColum?

 Thanks.

Parents Reply Children