I have a Wingrider and an imagelist. I would like to place an image in a cell depending on a criterion. See the code. But I can not, can someone help me;
Dim i as integer
Dim dt As New DataTable("dtTable")dt.Columns.Add("Imagem")dt.Columns.Add("Number")
For I=1 to 50
Dim row As DataRow = dt.NewRow()if i Mod 2 = 0 then
row(0) = "Image from imageList"
else
row(0) = "Other Image from imageList"
end ifrow(1) = idt.Rows.Add(row)
Next
appGrid.DataSource = dt
Thank you very much. Run perfectly.
Muito Obrigado. Funciono perfeitamente.
Hello, I believe that if you are setting a image using a dataSource, what else you need to do is to set the style of the column in the grid to be Image. UltraGrid1.DisplayLayout.Bands(0).Columns(0).Style = Infragistics.Win.UltraWinGrid.ColumnStyle.ImageYou can also set the type of the Colum in your datatable to be Image or bitmap; columnHeader.Columns.Add("Image", GetType(Bitmap))I am suggesting you to define strictly you’re the data type in your data source. I hope this helps.Sincerely,DimiDeveloper Support EngineerInfragistics, Inc.