Populating a PictureBox from Access database in C# -


i have search button able search thing write textbox. after clicking on button open new form information of want search. then, double-click on row want , populate data textbox of main form.

my problem here how populate `picturebox?

this method have:

public void doubleclickdatagridview() {     try     {         datagridviewrow dr = dgvsearch.selectedrows[0];          this.hide();          if (frm == null || frm.isdisposed)         {             frm.activate();         }         else         {             frm.show();             frm.lblid.text = dr.cells[0].value.tostring();             frm.lblphoneid.text = dr.cells[1].value.tostring();             frm.pictureboxphone.backgroundimage = dr.cells[54];         }     }     catch (exception ex)     {         messagebox.show("error\ndetalhes: " + ex.message, "error", messageboxbuttons.ok, messageboxicon.error);     } } 

this have @ moment frm.pictureboxphone.backgroundimage = dr.cells[54];, it's not correct.

how should solve it?


Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -