Checkbox not working when model has two parameters with same name except for casing

Took a awhile to find but had an issue with the checkboxes not working on a ListView. The display works but cant click the checkbox

turns out the model used for the rows has 2 properties that have the same name but different casing (not my class so i dont have a choice)


<SfListView DataSource="@courses" ShowCheckBox="true">
    <ListViewFieldSettings TValue="ItemData" Id="id" Text="Label" IsChecked="IsChecked">
</ListViewFieldSettings>
</SfListView>


@code {


private List<ItemData> courses;


protected override async Task OnInitializedAsync()
{
        courses = new List<ItemData>();
        courses.Add(new ItemData { id = 1, Label = "foo", IsChecked = false });
        courses.Add(new ItemData { id = 2, Label = "Bla", IsChecked = false });
}


public class SomeClass
{
...
}


public class TestThis
{
// this will cause the checkbox not to work
    public string Location { get; set; }
    public SomeClass location { get; set; }
}


public class ItemData
{
public bool IsChecked { get; set; }
public string Label { get; set; }
public TestThis myTest { get; set; }
}


}

1 Reply

PS Praveen Sellappan Syncfusion Team May 1, 2026 10:08 AM UTC

Hi Michael,


Greetings from Syncfusion Support.


We appreciate you sharing the details regarding the checkbox issue in the ListView. We have successfully replicated this behavior using a local sample.


After further validation, we have identified the root cause of this limitation. The issue arises due to a naming conflict in the data model used for binding the ListView. Specifically, the model contains two properties with the same name that differ only by casing. While this is valid in C#, Blazor component data binding relies on JSON serialization, which is case-insensitive. As a result, both properties are treated as the same during serialization, causing a conflict. This prevents the component from correctly tracking state changes, which explains why the checkbox renders but does not respond to user interaction.


This behavior is a known limitation of the Blazor framework’s serialization process.


You can find more technical details regarding this serialization behavior here:


c# - .NET Core - The JSON property name for collides with another property - Stack Overflow


We hope this information helps clarifies the situation. Please feel free to reach out if you require further assistance.


Regards,
Praveen Sellappan


Loader.
Up arrow icon