There are many ways to skin this old cat. When choosing the way, you must first decide when should the adding of images take place. I chose to add images during sorting.
Let us assume you already added some data to gridview via datatable using ;
So now you know we have a filled up dataGridView.
Now let us assume in the dataGridView1 we want to add images according to the data within the 6th column. So what we first need to do is to create an image column by writing;
Now we have a image column. With the name “img” with the header “Image Column” As you can see in the 5th line I have stated that my images are actually icons. The reason I did this was that I found out that icons take up less space and flickers less. You can if you want change this option as you see fit.
Now let us get cracking and add those images according to the columns;
I hope this has been informative. Please do tell if you see any mistakes and wish to make suggestions.