Hi,
I have some measurement date in a database table:
...
public int Number { get; set; }
public DateTime Start { get; set; }
public long ElapsedTime { get; set; }
...
I want make a view similar in the attached image with expandable rows group by the date.
In the Viewmodel I add a property to get the Date from Start to support GROUP BY Date:
public IQueryable<MeasurementViewModel> GetMeasurements()
{
var result = _context.Measurement.Select(w => new MeasurementViewModel
{
Date = w.Start.Date,
Start = w.Start,
Number = w.Number,
ElapsedTime = w.ElapsedTime,
}); ;
return result;
}
What is better to use: Grid with Grouping and aggregat or TreeList?
For TreeList I dont have parentID and childID. I think it is possible to calculate it.
The standard Grid group example doesn't work: if I drag the Date column to the header only the waiting spinner is shown.
A solution for the grid should be: without Text "Drag a column header..." and not changeable by user.
The expandable date-header-rows sould show some aggregates per day: Count() and SUM(ElapsedTime).
Is that possible?
Best regards,
Peter