Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Employee Emp= new Employee ();
        DataTable dt = Emp.Hierarchy();
        if (dt.Rows.Count != 0)
        {
            GridView1.DataSource = Emp.Hierarchy();
            GridView1.DataBind();

        }
        else
        {
            dt.Rows.Add(dt.NewRow());
            GridView1.DataSource = dt;
            GridView1.DataBind();
            GridView1.Rows[0].Visible = false;

        }
    }