protected void OnRowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { CheckBox CHKBOX = (e.Row.FindControl("Released") as CheckBox); CheckBox CHKBOX1 = (e.Row.FindControl("Released1") as CheckBox); DropDownList ddlEmployee = (e.Row.FindControl("ddlEmp") as DropDownList); DropDownList ddlEmployee2 = (e.Row.FindControl("ddlEmp2") as DropDownList); var Emplist1 = _service.GetAllSectorEmployee(); var lastrecord = _service.GetAllDailyManualRoaster().LastOrDefault(x => x.ManDailyRoasterDate == DateTime.Now.Date); var lastrecord2 = _service.GetAllDailyManualRoaster().LastOrDefault(x => x.ManDailyRoasterDate == DateTime.Now.Date); ddlEmployee.Bind(Emplist1, "EmployeeIdName", "Employee_Id"); ddlEmployee2.Bind(Emplist1, "EmployeeIdName", "Employee_Id"); } } private void BindGrid() { Entities entities = new Entities(); Gridview1.DataSource = (from customer in entities.SectorWisePoints join se in entities.SectorEmployees on customer.Sector_Id equals se.Sector_Id select new { customer.Name }).ToList(); Gridview1.DataBind(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)