for (int i = 0; i < dataGridView1.Rows.Count - 1; i++) { for (int j = 0; j < dataGridView1.Columns.Count - 1; j++) { if (this.dataGridView1.Rows[i].Cells[j].Value.ToString() == "") { this.dataGridView1.Rows[i].Cells[j].Value = "No Records Found"; } } }
if(dataGridView1.Rows.Count>0) { // your display code } else { label1.Text="No records found"; Lable1.Visible=true; }
<emptydatatemplate> No record found </emptydatatemplate>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)