Exemplo n.º 1
0
    private void viewdata()
    {
        try
        {
            DataTable dt1 = new DataTable();
            dt1 = objDist.DiagTest_IUDR_BAL("", "", "R", "", ConnKey);
            GvDiagTest.DataSource = dt1;
            GvDiagTest.DataBind();

            if (dt1.Rows.Count > 0)
            {
                GvDiagTest.HeaderRow.Cells[0].Attributes["data-class"] = "expand";

                //Attribute to hide column in Phone.
                GvDiagTest.HeaderRow.Cells[1].Attributes["data-hide"] = "phone";
                GvDiagTest.HeaderRow.Cells[2].Attributes["data-hide"] = "phone";


                //Adds THEAD and TBODY to GridView.
                GvDiagTest.HeaderRow.TableSection = TableRowSection.TableHeader;
            }
        }
        catch (Exception ex)
        {
            ExceptionLogging.SendExcepToDB(ex, Session["UsrName"].ToString(), Request.ServerVariables["REMOTE_ADDR"].ToString());
            Response.Redirect("~/Error.aspx");
        }
    }