Friday, May 29, 2009

Display nothing instead of cross image mark into DataGridViewImageColumn

if there are some cases into datagridviewimagecolumn like need to display image into first 3 rows and the remianing image column should be empty instead red cross image mark.

set the defaultcellstyle nullvalue property to NULL

for ex:
DataGridViewImageColumn imgCol = new DataGridViewImageColumn();
imgCol.DefaultCellStyle.NullValue = null;

1 comment: