We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

GetCHeckedItemsAsync when an item is diabled returns faulty result

var selecteddates = await SfListdepartingdate.GetCheckedItemsAsync();// selecteddates.Data == null when it should have a value


Attachment: Itenenary_ec758621.rar

2 Replies 1 reply marked as answer

LD LeoLavanya Dhanaraj Syncfusion Team December 13, 2022 05:24 PM UTC

Hi Eliud,


Greetings from Syncfusion support.


With the shared code details, we checked the mentioned issue in our Blazor ListView component and able to reproduce the issue with the latest version(V20.3.61). So, we have considered it as a bug on our end. The fix for this issue will be included in our weekly patch release on January 3, 2023. You can track the status of the issue's fix using the following feedback link.


Feedback link : https://www.syncfusion.com/feedback/39764/the-getcheckeditemsasync-method-does-not-work-in-the-blazor-listview-component


We have also checked the workaround way to resolve the reported issue. Check out the below mentioned code snippets and sample for your reference.


Sample : https://www.syncfusion.com/downloads/support/directtrac/general/ze/ListView-1744156639.zip


[Index.razor]

<SfListView DataSource="@Data" @ref="List" TValue="DataModel" CssClass=".e-listview" ShowCheckBox="true">

    <ListViewEvents TValue="DataModel" Clicked="onClicked"></ListViewEvents>

    <ListViewFieldSettings TValue="DataModel" Id="Id" Text="Text" Enabled="Enable"></ListViewFieldSettings>

</SfListView>

 

public class DataModel

{

  

    public bool canChecked { get; set; }

}

 

public async Task onClicked(ClickEventArgs<DataModel> args)

{

    Data.FirstOrDefault(item => item.Id == args.ItemData.Id).canChecked = args.IsChecked;

    var checkedItem = Data.Where(item => item.canChecked == true);

}


Regards,

Leo Lavanya Dhanaraj


Marked as answer

LD LeoLavanya Dhanaraj Syncfusion Team December 29, 2022 12:02 PM UTC

Hi Eliud,


Thanks for your patience.


We are glad to announce that our patch release (V20.4.40) has been rolled out successfully. The issues with “The GetCheckedItemsAsync method does not work in the Blazor ListView component ” have been resolved in this release.


To access this fix, we suggest you update the package to 20.4.40 and we include the sample in the latest version for your reference.


Samplehttps://www.syncfusion.com/downloads/support/directtrac/general/ze/SfListView6.0-1887924500.zip


Feedback: https://www.syncfusion.com/feedback/39764/the-getcheckeditemsasync-method-does-not-work-in-the-blazor-listview-component


Release Notes: https://blazor.syncfusion.com/documentation/release-notes/20.4.40?type=all#listview


Regards,

Leo Lavanya Dhanaraj


Loader.
Live Chat Icon For mobile
Up arrow icon