I want to group the data I have saved in an SQLite database by the content of one column from this database and load them in a listview. I have partly figured out how to load a column. I used this function but it only returned the 3 entries I have and not the right dates. It instead returned 01/01/01/0001 00:00:00.
public Task<List> GetCalendarEntriesStartDates()
{
return calendarentrydatabase.QueryAsync("SELECT DISTINCT [CalendarEntryStartDate],[CalendarEntryId] FROM [CalendarEntry] ORDER BY [CalendarEntryStartDate]");
}
I also find out how to create a class for the grouped content, but I don't know how to load the content in these groups.
public class CalendarGroup : IEnumerable
{
public DateTime CalendarEntryStartDate { get; set; }
public ObservableCollection CalendarEntries { get; set; }
IEnumerator IEnumerable.GetEnumerator()
{
return CalendarEntries.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return CalendarEntries.GetEnumerator();
}
}
Can someone explain to me how to do this, by using SQLite-net-plc?
↧
Using Grouping in listview, whose content is saved in an SQLite database
↧