Support binding to string array(IEnumerable<string>)
Hello,
I tried the ListView control and tried to bind the DataSource to a string array, then it threw a NullReferenceException:
```
Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Blazor.Lists.SfListView`1[[System.String, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].GetLiElementData(ListElementReference args, Boolean ischecked)
at Syncfusion.Blazor.Lists.SfListView`1[[System.String, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].GetProperties()
at Syncfusion.Blazor.Lists.SfListView`1.<OnAfterScriptRendered>d__3[[System.String, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
at Syncfusion.Blazor.SfBaseComponent.OnAfterRenderAsync(Boolean firstRender)
at Syncfusion.Blazor.Lists.SfListView`1.<OnAfterRenderAsync>d__2[[System.String, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
```
I think the issue is related to this post: Filtering with a List of strings and not objects, where the problem is due to the lack of support to List<string> as the data source.
Therefore, I'd like to request support data binding to string array(IEnumerable<string>).
Looking forward to your reply.
Xi
You can track the status of your reported problem through the below portal link.
Until then, we appreciate your patience.
Regards,
Shalini M.
On further validation on the reported scenario, we would like to let you know that the reported problem is not an issue from our end. We have removed the array binding support to the ListView component after the Volume 3 release.
Until then, we appreciate your patience.
Shalini M.
- 2 Replies
- 2 Participants
-
X X
- Sep 2, 2021 11:07 AM UTC
- Sep 16, 2021 06:49 AM UTC