One way to achieve this is to use the Paint () event to check the lines, and if they are not there, write your message: Collapse
private void dataGridView1_Paint ( object sender, PaintEventArgs e )
{
DataGridView sndr = ( DataGridView )sender;
if ( sndr.Rows.Count == 0 )
{
using ( Graphics grfx = e.Graphics )
{
grfx.FillRectangle ( Brushes.White, new Rectangle ( new Point (), new Size ( sndr.Width, 25 ) ) );
grfx.DrawString ( "No data returned", new Font ( "Arial", 12 ), Brushes.Black, new PointF ( 3, 3 ) );
}
}
}
JOAT-MON .
,
Imdadhusen