I have a datagridview that has a column for an Image. The user can choose an image file from their local computer and add it to the datagridview.
Bitmap bmp = (Bitmap)Bitmap.FromFile(pictureBox_AbilityInfo_Icon.ImageLocation);
Once the user is finished adding information to the datagridview, I am saving the contents of each cell so that I can load it again later.
When saving the value of Image column I am using the following code:
doc.Element("AbilityInformation").Element(abilityName).Add(new XAttribute("Icon", form_MainUI.dataGridView_AbilityInfo_ClassAbllityInformation.Rows[i].Cells[2].Value));
However, this saves as the following: Icon=”System.Drawing.Bitmap”
I WANT to save the image’s local path so that I can load the picture again when I load the saved information.
How do I get a datagridviewimagecolumn image path?