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
460
Showing large image in node's cell
posted

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

End With

_IDColumn = rootColumnSet.Columns.Add("UniqueName")

With _IDColumn

.Visible = False

End With

_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

End With

_DescriptionColumn = rootColumnSet.Columns.Add("Value")

With _DescriptionColumn

.DataType = GetType(String)

.AllowSorting = DefaultableBoolean.False

.AllowCellEdit = AllowCellEdit.ReadOnly

End With

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")

 

  • 69832
    Offline posted

    Assign an Infragistics.Win.EmbeddableImageRenderer instance to the column's Editor property.