//Documents Grid Bind #region [Documents Grid Bind] private void GrdDocumentBind() { try { objEWA.OrgId = orgId; DataSet ds = objBL.DocumentsGridBind_BL(objEWA); if (ds.Tables[0].Rows.Count == 0 || ds == null) { ds.Tables[0].Rows.Add(ds.Tables[0].NewRow()); GrdDocument.DataSource = ds; GrdDocument.DataBind(); int columncount = GrdDocument.Rows[0].Cells.Count; GrdDocument.Rows[0].Cells.Clear(); GrdDocument.Rows[0].Cells.Add(new TableCell()); GrdDocument.Rows[0].Cells[0].ColumnSpan = columncount; GrdDocument.Rows[0].Cells[0].Text = "No Records Found"; } else { GrdDocument.DataSource = ds; GrdDocument.DataBind(); } } catch (Exception exp) { GeneralErr(exp.Message.ToString()); } }
//Page Indext Created #region GrdIndexChanged protected void GrdDocument_PageIndexChanging(object sender, GridViewPageEventArgs e) { try { GrdDocument.PageIndex = e.NewPageIndex; objEWA.OrgId = Convert.ToInt32(orgId.ToString()); GrdDocument.DataSource = objBL.DocumentsGridBind_BL(objEWA); GrdDocument.DataBind(); } catch (Exception exp) { GeneralErr(exp.Message.ToString()); } }