Hi Jean,
Thank you for using Syncfusion products.
We have checked the reported query “Issue with empty group in ListView” from our end. We would like to inform you that we could reproduce the reported scenario when drag and drop an item to another group. The basic idea of empty grouping is we create an empty item with size as zero. In this case, the dummy item is still maintained in the collection. So, we need to remove the dummy items from the collection once we populate items at run time. Please refer the following code snippets to overcome the reported scenario,
In the Add button command, remove the dummy items from the collection.
private void OnButtonTapped(object obj)
{
var groupresult = obj as GroupResult;
var random = new Random();
var contact = new Contacts(CustomerNames[random.Next(0, CustomerNames.Count() - 1)], random.Next(100, 450).ToString() + "-" + random.Next(451, 962).ToString());
contact.ContactImage = ImageSource.FromResource("ListViewXamarin.Images.Image" + random.Next(0,28) + ".png");
contact.Group = groupresult.Key.ToString();
ContactsInfo.Add(contact);
foreach (var item in groupresult.Items)
{
if ((item as Contacts).ContactName == "")
ContactsInfo.Remove((Contacts)item);
}
} |
We have attached the tested sample in the following link,
You can also refer to the following document regarding the same from the following link,
Please check the sample and let us know if you need further assisitance.
Regards,
Lakshmi Natarajan