private void FormatGrid() { int intCols = 0; string strStyle = null; decimal val = 0; // Databind Grid this.uwgProjects.DataBind(); // clsSchedule schedule = new clsSchedule(); int intEmployeeID = 0; // InitializeGrid(); // foreach (UltraGridRow uwgRow in this.uwgProjects.Rows) { if (uwgRow.Band.Index == 0) { uwgRow.Band.RowStyle.CssClass = "ChildRowStyle"; uwgRow.Band.RowAlternateStyle.CssClass = "ChildAlternateRowStyle"; intEmployeeID = uwgRow.Cells[15].Value.GetValueOrDefault<int>(); for (intCols = 5; intCols <= 24; intCols++) { val = schedule.GetEmployeeWeekTotal(intEmployeeID, WeekDate.WeekIDs[intCols - 5]); strStyle = schedule.GetWeekHoursStyle((int)val); uwgRow.Cells[intCols].Style.CssClass = strStyle; } } } }
private void FormatGrid() { int intCols = 0; string strStyle = null; object val = null; // clsSchedule schedule = new clsSchedule(); int intEmployeeID = Request.Params["EID"].GetValueOrDefault<int>(); // Databind Grid this.uwgProjects.DataBind(); // InitializeGrid(); // //UltraGridRow uwgRow = default(UltraGridRow); // foreach (UltraGridRow uwgRow in this.uwgProjects.Rows) { if (uwgRow.Band.Index == 0) { uwgRow.Band.RowStyle.CssClass = "ChildRowStyle"; uwgRow.Band.RowAlternateStyle.CssClass = "ChildAlternateRowStyle"; for (intCols = 4; intCols <= 13; intCols++) { val = schedule.GetEmployeeWeekTotal(intEmployeeID, intWeekIDs[intCols - 4]); strStyle = schedule.GetWeekHoursStyle(val.GetValueOrDefault<int>()); uwgRow.Cells[intCols].Style.CssClass = strStyle; } } } }