Can't add a row in SFGrid when Database table is empty
Hello Syncfusion team,
Following https://stackoverflow.com/questions/66546568/cant-add-a-row-in-sfgrid-when-database-table-is-empty
Is this issue solved? as I face it also (Syncfusion Blazor 19.2.0.49)
Thanks,
Shay
- Share the Grid code example.
- Share more details about the Grid datasource and datasource type.
- Share video demonstration of the issue along with replication procedure.
- Are you facing any script error or exception in browser console. if yes, share the screenshot of the issue.
- If possible share a simple issue reproducible sample.
I will send sample to support,
Shay
I'm having this issue with version 23.2.6.
I have an SfGrid bound to an empty table with the Add button on the toolbar. When I click the toolbar an exception is thrown:
[2023-11-30T07:03:10.578Z] Error: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at System.Collections.Generic.List`1.get_Item(Int32 index)
at Syncfusion.Blazor.Grids.Internal.Edit`1.AddRecord(Object data, Nullable`1 index)
at Syncfusion.Blazor.Grids.SfGrid`1.AddRecordAsync()
at Syncfusion.Blazor.Grids.SfGrid`1.AddRecord()
at Syncfusion.Blazor.Grids.Internal.GridToolbar`1.ToolbarClickHandler(ClickEventArgs args)
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Syncfusion.Blazor.Navigations.SfToolbar.TriggerClickEvent(MouseEventArgs e, Nullable`1 trgParentDataIndex, ItemModel clickedItem)
at Syncfusion.Blazor.Navigations.Internal.ToolbarContent.OnItemClick(MouseEventArgs e)
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
I am using .Net 7 in a Blazor Server application.
Your help is appreciated!
Thanks
Hi Michael,
Greetings from Syncfusion support.
We have prepared an simple sample using .Net7 with Blazor server. But we are unable to replicate the reported issue at our end. Kindly refer the below attached sample for your reference.
If you still face the reported issue then kindly share us the below details for additional information.
- Share us the entire Grid code snippet.
- Share us the video demonstration of the issue.
- If possible share us the issue replicating sample or try to reproduce the issue on the below mentioned sample.
The above requested details will be very helpful for us to validate the reported issue at our end.
Regards,
Monisha
Attachment: CRUDServerApp_16d10920.zip
- 5 Replies
- 5 Participants
-
SB Shay Berger
- Aug 2, 2021 12:29 PM UTC
- Dec 1, 2023 09:37 AM UTC