I add a new column in the ColumnSetGenerated event as follows:
UltraTreeNodeColumn colImage = new UltraTreeNodeColumn(); colImage.DataType = typeof(Bitmap); colImage.Key = "Image"; colImage.LayoutInfo.PreferredCellSize = new Size(24, 24); e.ColumnSet.Columns.Add(colImage);
And, I assign a image in the InitializeDataNode event as follows:
int imageIndex = Convert.ToInt32(e.Node.Cells["ImageKey"].Value); e.Node.Cells["Image"].Value = new Bitmap(this.imageList1.Images[imageIndex]);
But, all I see in the column is a string "System.Drawing...", What am I doing wrong?
You have to assign an editor to the column that can handle images:
colImage.Editor = new EmbeddableImageRenderer();