hi,
I'm trying to show a 48x48 image but I got the type full namespace "System.Drawing.Bitmap" in cell. What am I missing?
many thanks,
Dim rootColumnSet As UltraTreeColumnSet = Me.uTree.ColumnSettings.RootColumnSet
rootColumnSet.Columns.Clear()
With uTree
.DisplayStyle = UltraTreeDisplayStyle.WindowsVista
.ViewStyle = ViewStyle.OutlookExpress
With .ColumnSettings
.BorderStyleCell = UIElementBorderStyle.Solid
.AutoFitColumns = AutoFitColumns.ResizeAllColumns
End With
_IDColumn = rootColumnSet.Columns.Add("UniqueName")
With _IDColumn
.Visible = False
_ImageColumn = rootColumnSet.Columns.Add("Name")
With _ImageColumn
.DataType = GetType(System.Drawing.Bitmap)
.LayoutInfo.PreferredCellSize = New Size(CInt(Me.Width / 2), 48)
.AllowSorting = DefaultableBoolean.False
.ShowSortIndicators = DefaultableBoolean.False
_DescriptionColumn = rootColumnSet.Columns.Add("Value")
With _DescriptionColumn
.DataType = GetType(String)
.AllowCellEdit = AllowCellEdit.ReadOnly
Dim f As New IO.FileStream("C:\MyImage.png", IO.FileMode.Open, IO.FileAccess.Read)
Dim node As UltraTreeNode = uTree.Nodes.Add("Export")
node.SetCellValue(_ImageColumn, Image.FromStream(f))
node.SetCellValue(_DescriptionColumn, "Export")
Assign an Infragistics.Win.EmbeddableImageRenderer instance to the column's Editor property.