Files
VAR.DatabaseExplorer/ServerExplorer/UI/FrmDatos.cs

46 lines
1.0 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ServerExplorer.UI
{
public partial class FrmDatos : Form
{
#region Form life cycle
public FrmDatos(DataTable dt, String titulo)
{
InitializeComponent();
Text = titulo;
dgvDatos.DataSource = dt;
}
private void frmDatos_Load(object sender, EventArgs e) { }
#endregion
#region Events
private void dgvDatos_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { }
private void dgvDatos_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
if (e.DesiredType == typeof(Image))
{
if (e.Value is DBNull || ((byte[])e.Value).Length <= 0)
{
e.Value = new Bitmap(1, 1);
}
}
}
#endregion
}
}