this.sfDataGrid1.ToolTipOpening += sfDataGrid1_ToolTipOpening;
void sfDataGrid1_ToolTipOpening(object sender, ToolTipOpeningEventArgs e)
{
if (e.Column.MappingName == "Country" && e.Record != null)
{
var byteArray = (e.Record as OrderInfo).Country;
if (byteArray != null)
{
using (System.IO.MemoryStream stream = new MemoryStream(byteArray))
{
e.ToolTipInfo.Items[0].Text = string.Empty;
e.ToolTipInfo.Items[0].Image = new Bitmap(Image.FromStream(stream));
}
}
}
} |
this.sfDataGrid1.ToolTipOpening += sfDataGrid1_ToolTipOpening;
void sfDataGrid1_ToolTipOpening(object sender, ToolTipOpeningEventArgs e)
{
if (e.Column.GetType() == typeof(GridImageColumn) && e.Record != null)
{
ItemPropertiesProvider provider = this.sfDataGrid1.View.GetPropertyAccessProvider();
var byteArray = (byte[])provider.GetValue(e.Record, e.Column.MappingName);
if (byteArray != null)
{
using (System.IO.MemoryStream stream = new MemoryStream(byteArray))
{
e.ToolTipInfo.Items[0].Text = string.Empty;
e.ToolTipInfo.Items[0].Image = new Bitmap(Image.FromStream(stream));
}
}
}
}
|
this.sfDataGrid1.ToolTipOpening += sfDataGrid1_ToolTipOpening;
void sfDataGrid1_ToolTipOpening(object sender, ToolTipOpeningEventArgs e)
{
if (e.Column.GetType() == typeof(GridImageColumn) && e.Record != null)
{
ItemPropertiesProvider provider = this.sfDataGrid1.View.GetPropertyAccessProvider();
var byteArray = (byte[])provider.GetValue(e.Record, e.Column.MappingName);
if (byteArray != null)
{
using (System.IO.MemoryStream stream = new MemoryStream(byteArray))
{
e.ToolTipInfo.Items[0].Text = string.Empty;
e.ToolTipInfo.Items[0].Image = new Bitmap(Image.FromStream(stream));
e.ToolTipInfo.Items[0].Padding = new Padding(0);
}
}
}
} |