private void LoadGrid() { DataTable dtinfo = null; // Get items from Guestbook DataLayer.SQLDataProvider data = new DataLayer.SQLDataProvider(); dtinfo = data.GetGuestbookDataByApprovalType(true); if (data.SQLError == null) { if (dtinfo.Rows.Count > 0) { // Bind items to grid GridView1.DataSource = dtinfo; GridView1.DataBind(); } } else { lblError.Text = data.SQLError.Message; } }
private void LoadData() { DataLayer.SQLDataProvider data = new DataLayer.SQLDataProvider(); GridView1.DataSource = data.GetGuestbookDataByApprovalType(rblStatus.SelectedValue); GridView1.DataBind(); }