Пример #1
0
 //bind gvApprovalLeaveChild
 protected void gvApprovalLeave_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         GridView  gvApprovalLeaveChild = (GridView)e.Row.FindControl("gvApprovalLeaveChild");
         DataTable dt = leave.FetchApprovalLeaveChildDetails(Convert.ToInt32(gvApprovalLeave.DataKeys[e.Row.RowIndex].Value));
         if (dt.Rows.Count > 0)
         {
             gvApprovalLeaveChild.DataSource = dt;
             gvApprovalLeaveChild.DataBind();
         }
         else
         {
             //no data found
         }
     }
 }