I'm implementing listview grouping in xamarin forms to display the list within a listview. I need to show one header and a list under the header.
Models:
public class ActivityHistoryDetails
{
public string EventDate { get; set; }
public List<History> History { get; set; }
}
I'm binding a list of "ActivityHistoryDetails" type to the listview.
Now I'm able to display only the header with this code. Sub Lists are not binding.
For your needs, you can refer to this link.
According to your code, I wrote a runnable, minimized example for your reference, you can refer to it to modify your code.
Here is the
History
class:Here is the
ActivityHistoryDetails
class:Use
GroupedView.ItemsSource = ActivityHistoryDetails.All;
for data binding.The xaml code is the same as the code you provided.
Here is the screenshot: