I have 2 questions regarding grouping
1) is it possible to have custom template as group header? I would like to add a switch in all groups if possible.
2) Based on a a boolean column I want group to be collapsed or not collapsed when page is loaded. I tried as below all collapsed by default
this.datagrid.GroupCollapsing += dataGrid_GroupCollapsing;
AllowGroupExpandCollapse="True"
AutoExpandGroups="False"
then control it within GroupCollapsing event but this is event is not called by AllowGroupExpandCollapse, It is only called when I collapse manually myself by tapping on a group. How can I achieve it? Best is if possible with binding in mvvm.
void dataGrid_GroupCollapsing(object sender, Syncfusion.SfDataGrid.XForms.GroupChangingEventArgs e)
{
var Items= (e.OriginalSender as SfDataGrid).BindingContext as List<Item>;
if (!Items[((int)e.Group.Key)-1].IsCompleted)
e.Cancel = true;
}