private void populateData() { List <TimeSlot> timeSlotsArray = new List <TimeSlot>(); timeSlotsArray = timeSlotService.getAllTimeSlots(); foreach (TimeSlot timeSlot in timeSlotsArray) { dataGridTimeSlots.Rows.Add(timeSlot.Id, timeSlot.StHours + " : " + timeSlot.StMinutes, timeSlot.EtHours + " : " + timeSlot.EtMinutes, timeSlot.Duration); } }