protected void GridFill() { using (PTCLEntities db = new PTCLEntities()) { var reportData = db.spReportData().ToList(); GVAdmin.DataSource = reportData; GVAdmin.UseAccessibleHeader = true; if (GVAdmin.Rows.Count > 0) { GVAdmin.HeaderRow.TableSection = TableRowSection.TableHeader; lblAdminmsg.Text = ""; } else { ; } GVAdmin.DataBind(); } }