protected void ChildGridview2_RowCommand(object sender, System.Web.UI.WebControls.GridViewCommandEventArgs e) { if (e.CommandName == "Edit") { int i = ((GridViewRow)((ImageButton)e.CommandSource).NamingContainer).RowIndex; int l =((GridViewRow)((GridViewRow)((GridViewRow)((ImageButton)e.CommandSource).NamingContainer).Parent.Parent.Parent.Parent)).RowIndex; int m =((GridViewRow)((GridViewRow)((GridViewRow)((ImageButton)e.CommandSource).NamingContainer)).Parent.Parent.Parent.Parent).RowIndex; //string ClientID = ((HiddenField)((GridView)ParentGridview.Rows[l].FindControl("ChildGridview1")).Rows[i].FindControl("hfProjectID")).Value; int EmployeeID = Convert.ToInt32(((HiddenField)((GridView)((GridView)ParentGridview.Rows[l].FindControl("ChildGridview1")).Rows[i].FindControl("ChildGridview2")).Rows[m].FindControl("hfEmpolyeeID")).Value); int ClientID = Convert.ToInt32(((HiddenField)((GridView)((GridView)ParentGridview.Rows[l].FindControl("ChildGridview1")).Rows[i].FindControl("ChildGridview2")).Rows[m].FindControl("hfclient")).Value); string Day = ((HiddenField)((GridView)((GridView)ParentGridview.Rows[l].FindControl("ChildGridview1")).Rows[i].FindControl("ChildGridview2")).Rows[m].FindControl("hfdate")).Value; string Query = EmployeeID.ToString()+"/" + ClientID.ToString()+"/" + Day; Response.Redirect("EditTimecard.aspx?val=" + Query); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)