private void toolTipController1_GetActiveObjectInfo(object sender, DevExpress.Utils.ToolTipControllerGetActiveObjectInfoEventArgs e) { try { if (e.Info == null && e.SelectedControl == gridControlTeknikBilgiler) { GridView view = gridControlTeknikBilgiler.FocusedView as GridView; GridHitInfo info = view.CalcHitInfo(e.ControlMousePosition); if (info.InRowCell) { string text = view.GetRowCellDisplayText(info.RowHandle, "image"); if (!text.Equals("")) // resim linkidir { var request = WebRequest.Create(text); Image image = null; using (var response = request.GetResponse()) using (var stream = response.GetResponseStream()) { image = Bitmap.FromStream(stream); } string cellKey = info.RowHandle.ToString() + " - " + info.Column.ToString(); ToolTipControlInfo toolTipInfo = new ToolTipControlInfo(cellKey, text); SuperToolTip superTip = new SuperToolTip(); superTip.Items.Add(new ToolTipItem() { Image = image }); toolTipInfo.SuperTip = superTip; e.Info = toolTipInfo; } } } } catch (Exception ex) { } } |