VB.NET DataGridView change image style (tile, stretch, center, zoom)

1

How can I change in a Picture Cell of a DataGridView, that the image be seen in tile, stretch, center or zoom mode?

By default I get the image that protrudes from the Cell and I need it to look whole.

    
asked by Adrian Hernando Solanas 29.06.2018 в 06:48
source

1 answer

3

What you must do is modify the ImageLayout property of the column so that it is of type Stretch :

CType(dataGridView1.Columns("imagen"), DataGridViewImageColumn).ImageLayout = DataGridViewImageCellLayout.Stretch

Change "imagen" by the name of your column.

    
answered by 29.06.2018 / 09:07
source