How do I get the error icon used by the DataGridImageCell?
I am displaying multiple thumbnail objects in two ways: one in the DataGridView and one in a custom control.
In the DataGridView, the thumbnail is displayed in the DataGridViewImageCell. If the sketch is missing, the cell displays an error icon.
I want to show this icon in my custom control too. How do I understand this? Preferably no pinvoke, but beggars cannot be selected.
source to share
I would recommend turning this problem head-on: make sure the line never shows an error icon. You should be able to do this by catching the cell data display event. If there is no image, display an image from the resource segment (and obviously use the same image in the custom control).
The problem with trying to match the inline grid error image is that if the image is changed in a future version, you will have to change your application.
source to share