Loaded event to early?

Goodmorning,

In the attached example i used your example from Github.

I converted it to the newest versions of Visual Studio etc.

I want to use the CollapseAll() on the Load event but nothing is happening.


Using:

VS2022 17.2.0 Preview 5.0

Syncfusion.Maui.Listview 20.1.51-preview


Can you


Best regards,

Thijs van Rijswijk


Attachment: SfListViewCollapse_a56658ef.zip

6 Replies

LN Lakshmi Natarajan Syncfusion Team May 3, 2022 08:33 AM UTC

Hi Thijs,


We could replicate the reported scenario when using CollapseAll method in the Loaded event of the SfListView. We will analyze the reported scenario at our source level and update you with further details on May 5, 2022. We appreciate your patience until then.


Meanwhile, we suggest you set the DataSource.AutoExpandGroups to false to collapse all the groups on loading. Please refer to the following code snippets for more reference,


protected override void OnAttachedTo(SfListView bindable)

{

    ListView = bindable;

    ListView.DataSource.AutoExpandGroups = false;

    ListView.DataSource.GroupDescriptors.Add(new GroupDescriptor()

    {

        PropertyName = "ContactName",

        KeySelector = (object obj1) =>

        {

            var item = (obj1 as ListViewContactInfo);

            return item.ContactName[0].ToString();

        },

    });

    base.OnAttachedTo(bindable);

}


Regards,

Lakshmi Natarajan




TV Thijs van Rijswijk May 12, 2022 03:37 AM UTC

Hi,

The dame source as above gives an error if compiled en run with VS 2022 17.3.0 Preview 1.0

If you comment out de .xaml of the listview the example runs fine.

Everything works fine with  VS2022 17.2.0 Preview 5.0.


Regards,

Thijs van Ri


Attachment: error_f306f069.zip


LN Lakshmi Natarajan Syncfusion Team May 12, 2022 02:04 PM UTC

Hi Thijs,


Could you please share the following details which will be helpful for us to check on the reported scenario further?


  • Stack trace of the crash
  • Share output window error
  • SfListView package version


It will be helpful for us to check on it and provide you with the details as soon as possible.


Regards,

Lakshmi Natarajan




TV Thijs van Rijswijk May 12, 2022 02:25 PM UTC

Hi,


Attached the source.


Regards,


Thijs van Rijswijk


Attachment: SfListViewCollapse_735efebf.zip


LN Lakshmi Natarajan Syncfusion Team May 16, 2022 03:59 AM UTC

Hi Thijs,


We Will check the given sample in VS 2022 17.3.0 Preview 1.0 and update you further details on or before May 17, 2022. We appreciate your patience until then.


Regards,

Lakshmi Natarajan




LN Lakshmi Natarajan Syncfusion Team May 17, 2022 12:55 PM UTC

Hi Thijs,


The reported error has been resolved in our latest Nuget update v20.1.0.56. Please update the Syncfusion packages to the latest version to resolve the issue.


Please let us know if you need further assistance.


Regards,

Lakshmi Natarajan



Loader.
Up arrow icon