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


5 Replies

VN Vignesh Natarajan Syncfusion Team August 3, 2021 11:44 AM UTC

Hi Shay,  
 
Thanks for contacting Syncfusion support.  
 
Query: “Can't add a row in SFGrid when Database table is empty” 
 
We have analyzed the reported issue and we would like to inform you that we have resolved that issue “Can't add a row in SFGrid when Database table is empty” in our 2021 Volume 1 Service pack 1 release. Please find the release notes regarding the same from below  
 
 
So kindly share the following details to validate the reported query at our end  
 
  1. Share the Grid code example.
  2. Share more details about the Grid datasource and datasource type.
  3. Share video demonstration of the issue along with replication procedure.
  4. Are you facing any script error or exception in browser console. if yes, share the screenshot of the issue.   
  5. If possible share a simple issue reproducible sample.
 
Above requested details will be very helpful for us to validate the reported query at our end and provide solution as early as possible.  
 
Regards, 
Vignesh Natarajan  
 



SB Shay Berger August 5, 2021 09:56 AM UTC

I will send sample to support,


Shay



RN Rahul Narayanasamy Syncfusion Team August 6, 2021 03:53 AM UTC

Hi Shay, 

Thanks for the update. 

We will wait to hear from you. Please get back to us with the above mentioned details. It will be helpful to check the problem further and provide a better solution. 

Regards, 
Rahul 



CO Collazo November 30, 2023 07:04 AM UTC

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



MS Monisha Saravanan Syncfusion Team December 1, 2023 09:37 AM UTC


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.


  1. Share us the entire Grid code snippet.
  2. Share us the video demonstration of the issue.
  3. 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

Loader.
Up arrow icon