Hi,
Sorry but I can’t set an image (from file, from resources or from imageList) on a datagridview.
I use this code:
Dim myDgcImage As Wisej.Web.DataGridViewImageCell
myDgcImage= MyDgv.Rows(e.RowIndex).Cells(0)
myDgcImage.Value = myImage
I have no error but the cell remain empty…
What is wrong?
Thank you
Giorgia
I’ve a datagridview with 5 columns defined from designer. The first column is an imageColumn. At runtime I want to add 10 rows and for each row at first column I have to assign a different image…I use the last wisej version (2.5.30)…In vwg I use this code and it’s work:
Private Sub MyDgv_CellFormatting(ByVal sender As Object, ByVal e As Gizmox.WebGUI.Forms.DataGridViewCellFormattingEventArgs) Handles MyDgv.CellFormatting
dim GRT_IML = 0
If e.ColumnIndex = GRT_IML Then
Try
e.Value = myImageList.Images(e.RowIndex)
Dim dgcImage As Gizmox.WebGUI.Forms.DataGridViewImageCell
dgcImage = MyDgv.Rows(e.RowIndex).Cells(e.ColumnIndex)
dgcImage.ImageLayout = DataGridViewImageCellLayout.Stretch
dgcImage.Update()Catch ex As Exception
End Try
End If
MyDgv.Update()End Sub
I’ve tried to repliate it but in wisej the cells remain empty…The event is fired and I have no errors but the images aren’t visible…
Hi
we tried on our end but could not reproduce yet.
Can you please provide us with a test case and also tell us the Wisej version you´re using?
Thanks in advance,
Frank
Please login first to submit.