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