I had an issue with this as well. A link to this documentation within the documentation for the SfListView itself would be nice. I pushed my app to Production and users rated poorly because my group headers were missing. They were present in Debugging because I had used :
<DataTemplate x:DataType="dataSource:GroupContext">
Apparently the debugger was able to resolve this but my production build was not.
Hi Nathen Brewer,
We would like to let you know that the binding context for the GroupHeaderTemplate will be a GroupResult, we have processed the Key, DisplayItems, and counts from GroupResult in DataSource, Hence we suggest you to DataType as GroupResult. Kindly refer to the below code snippet and documentation for more reference.
Code snippet:
<syncfusion:SfListView.GroupHeaderTemplate> <DataTemplate x:DataType="result:GroupResult"> <StackLayout HorizontalOptions="Fill" VerticalOptions="StartAndExpand"> <Label FontAttributes="Bold" FontSize="18" HorizontalOptions="CenterAndExpand" Text="{Binding Key}" TextColor="White" /> </StackLayout> </DataTemplate> </syncfusion:SfListView.GroupHeaderTemplate>
|
Regards,
Suthi Yuvaraj.