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
710
Bitmap not showing up
posted

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?

Parents
No Data
Reply Children
No Data