I have written the following lines of code to retrieve data from database. When I checked through a lable it is showing that the datatable has data, but its unable to display the data in gridview. Can anyone suggest any solution to this.Thanks in advance
DataSetTableAdapters.retrievebookingTableAdapter rta = new dataSetTableAdapters.retrievebookingTableAdapter();
DataSet.retrievebookingDataTable rdt;
rdt = rta.GetData(EmailID.Text);
GridView1.DataSource = rdt;
GridView1.DataBind();
if (rdt == null)
{
Label1.Visible = true;
Label1.Text = "No data found";
}
else
{
Label1.Visible = true;
Label1.Text = "data exists";
}