How to Bind Empty Records for No record Found Situation.

Jayakumars
Posted by Jayakumars under ASP.NET AJAX category on | Points: 40 | Views : 671
I have Post the Code
How to Bind Empty Records for No record Found Situation.

Server Side
================

protected void Bt_Submit1_Click1(object sender, EventArgs e)
{
DataTable dt = new DataTable();
dt.Columns.Add("Ename");
DataRow dr;
dr = dt.NewRow();
dr[0] = "No Records Found";
dt.Rows.Add(dr);
if (dt.Rows.Count == 0)
{
GridView2.DataSource = dt;
GridView2.DataBind();
}

}

Comments or Responses

Login to post response