private void FillGridSprints() { gridSprints.BeginUpdate(); gridSprints.ListGridColumns.Clear(); gridSprints.ListGridColumns.Add(new GridColumn("Start Date", 70)); gridSprints.ListGridColumns.Add(new GridColumn("Title", 50)); gridSprints.ListGridRows.Clear(); foreach (JobSprint sprint in JobSprints.GetAll().OrderByDescending(x => x.DateStart)) { GridRow row = new GridRow() { Tag = sprint }; row.Cells.Add(sprint.DateStart.ToShortDateString()); row.Cells.Add(sprint.Title.ToString()); gridSprints.ListGridRows.Add(row); } gridSprints.EndUpdate(); }
private void FillGrid() { List <JobSprint> listJobSprints = JobSprints.GetAll(); gridMain.BeginUpdate(); gridMain.ListGridColumns.Clear(); gridMain.ListGridRows.Clear(); gridMain.ListGridColumns.Add(new GridColumn("Date Start", 70, HorizontalAlignment.Center, GridSortingStrategy.DateParse)); gridMain.ListGridColumns.Add(new GridColumn("Date End", 70, HorizontalAlignment.Center, GridSortingStrategy.DateParse)); gridMain.ListGridColumns.Add(new GridColumn("Title", 0)); foreach (JobSprint jobSprint in listJobSprints) { gridMain.ListGridRows.Add( new GridRow( new GridCell(jobSprint.DateStart.ToShortDateString()), new GridCell(jobSprint.DateEndTarget.ToShortDateString()), new GridCell(jobSprint.Title)) { Tag = jobSprint } ); } gridMain.EndUpdate(); }