private void gvResimYukle() { if (gvUrunListesi.SelectedRowsCount > 0) { da = new SqlDataAdapter("select * from Resim where StokID = @StokID", SqlConnections.GetAresUTSqlConnection()); da.SelectCommand.Parameters.Add("@StokID", SqlDbType.Int).Value = gvUrunListesi.GetFocusedRowCellValue("StokID"); dtResim = new DataTable(); da.Fill(dtResim); gcResimler.DataSource = dtResim; if (dtResim.Rows.Count > 0) { pictureEdit1.DataBindings.Clear(); pictureEdit1.DataBindings.Add("EditValue", dtResim, "Resim", true, DataSourceUpdateMode.OnPropertyChanged); } else { pictureEdit1.DataBindings.Clear(); pictureEdit1.EditValue = null; } } }