Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27407

DefaultCellStyle.NullValue or setting standard error graphic to Bitmap

$
0
0
i have a databound DGV and need to replace the standard error graphic to my own Image so when the user clicks add new the ugly red cross icons do not show

i have read the info on MSDN and done some google searches as well as a lot of playing around with code but cant seem to get it to work


Source for this http://msdn.microsoft.com/en-AU/libr...=vs.85%29.aspx
So this is what i can understand so far and what i have tried

according to MSDN to change the standard error image you set the DataGridViewCellStyle.NullValue property for this cell style object to a null reference

So i tried

Code:

ProfilesDataGridView.DefaultCellStyle.NullValue = vbNull
However i get this error

Quote:


the following exception occured in the datagridview:

system.formatException: Formated value of the cell has wrong type

BUT all that just disables the standard error image i think?

I need to know how to change the image from icon to bitmap so i can use my own png image.

Viewing all articles
Browse latest Browse all 27407

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>