private void repImg_Popup(object sender, EventArgs e) { if (!(sender is DevExpress.XtraEditors.ImageEdit)) { return; } DevExpress.XtraEditors.ImageEdit repImg = sender as DevExpress.XtraEditors.ImageEdit; DevExpress.XtraGrid.Views.Grid.GridView gv = (repImg.Parent as DevExpress.XtraGrid.GridControl).MainView as DevExpress.XtraGrid.Views.Grid.GridView; DataRow _tpDr = gv.GetDataRow(gv.FocusedRowHandle); if (_tpDr["Icon"].Equals(System.DBNull.Value)) { byte[] _tpBytes = ServerRefManager.PicFileRead(_tpDr["StylePic"].ToString(), _tpDr["Pic_Version"].ToString()); gv.FocusedColumn = gv.Columns["Icon"]; gv.ShowEditor(); if (gv.ActiveEditor is DevExpress.XtraEditors.ImageEdit) { if (repImg.Properties.ShowPopupShadow == false) { repImg.ShowPopup(); } } if (_tpBytes == null) { _tpDr["Icon"] = new byte[1]; } else { _tpDr["Icon"] = _tpBytes; } gv.RefreshRow(gv.FocusedRowHandle); repImg.ShowPopup(); } }