Esempio n. 1
0
        private void GridviewBind()
        {
            ds      = new DataSet();
            ObjPpms = new PpmsFlag();
            ds      = ObjPpms.GetPerformanceDetails();

            if (ds.Tables[0].Rows.Count > 0)
            {
                gvDetails.DataSource = ds;
                gvDetails.DataBind();
                dt = ds.Tables[0];
                Session[clsConstant.SESS_TABLE] = dt;
            }

            else
            {
                ds.Tables[0].Rows.Add(ds.Tables[0].NewRow());
                gvDetails.DataSource = ds;
                gvDetails.DataBind();
                int columncount = gvDetails.Rows[0].Cells.Count;
                gvDetails.Rows[0].Cells.Clear();
                gvDetails.Rows[0].Cells.Add(new TableCell());
                gvDetails.Rows[0].Cells[0].ColumnSpan = columncount;
                gvDetails.Rows[0].Cells[0].Text       = "No Records Found";
            }
        }
Esempio n. 2
0
 protected void GridviewBind()
 {
     ds      = new DataSet();
     ObjPpms = new PpmsFlag();
     ds      = ObjPpms.GetPerformanceDetails();
     grdPpmsFlag.DataSource = ds;
     grdPpmsFlag.DataBind();
     dt = ds.Tables[0];
     Session[clsConstant.SESS_TABLE] = dt;
 }