TreeGrid throws an error when data source changes

Hi,

We are working with v18.2.54.
We are using TreeGrid with list of ExpandoObject bound as its data source.
Our list is updated on change of drop down.
After list is updated we are calling StateHasChanged().
Also we tried to call TreeGrid.Refresh() and TreeGrid.RefreshColumns() but we still getting an error.
Here is the error message:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Syncfusion.Blazor.TreeGrid.Internal.GridRenderer`1.GetUpdatedFlatData(IEnumerable`1 dataSource)
   at Syncfusion.Blazor.TreeGrid.Internal.GridRenderer`1.OnPropertiesChanged(IDictionary`2 PropertyChanges, String Property)

When we could expect a fix for this issue?

Best regards,
Igor Surla


6 Replies 1 reply marked as answer

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team August 21, 2020 01:29 PM UTC

Hi Igor, 

Thanks for contacting Syncfusion Support. 

Query#:- System.NullReferenceException: Object reference not set to an instance of an object.  
 
We are able to replicate the problem at our end. We will validate and update you further details by 24th August 2020. 

Regards, 
Farveen sulthana T 



FS Farveen Sulthana Thameeztheen Basha Syncfusion Team August 24, 2020 01:52 PM UTC

Hi Igor, 

Thanks for your patience. 

Query#:- Also we tried to call TreeGrid.Refresh() and TreeGrid.RefreshColumns() but we still getting an error. 
Here is the error message: System.NullReferenceException: Object reference not set to an instance of an object. 

The reported problem is already known issue.  The fix to this problem will be included in our upcoming release of NuGet, which is expected to roll out on 25 August 2020. 
 
We will let you know once the fix has been included in this release. Until then we appreciate your patience. 
 
Regards, 
Farveen sulthana T 



IS Igor Surla August 26, 2020 03:40 PM UTC

Hi Farveen,

In v18.2.55 when EnableCollapseAll="true" I still get an error:

 Unhandled exception in circuit 'LFS6ee-c4TKLjI8-wZTisWV8-ltUrFq06Zpd-yfKWEU'.
System.Collections.Generic.KeyNotFoundException: The specified key 'parentUniqueID' does not exist in the ExpandoObject.
   at System.Dynamic.ExpandoObject.System.Collections.Generic.IDictionary<System.String,System.Object>.get_Item(String key)
   at Syncfusion.Blazor.TreeGrid.Internal.ExpandCollapse`1.ExpandCollapseRow(Row`1 Row)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_0(Object state)
   at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronously(TaskCompletionSource`1 completion, SendOrPostCallback d, Object state)
   at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.<>c.<.cctor>b__23_0(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteBackground(WorkItem item)

Best regards,
Igor Surla


MP Manivannan Padmanaban Syncfusion Team August 27, 2020 09:04 AM UTC

Hi Igor, 

Thanks for the update. 

In our end, we are unable reproduce the reported issue. We have built the sample in the specified version for your convenience with the property EnableCollapseAll=“true”. Refer to the below link, 

After referred the above sample, still facing an issue please get back to us with the below details. 
  1. Share the complete code example.
  2. Share the video demonstration of the issue.
  3. If possible, reproduce the issue in the shared sample Or share the issue reproducible sample.

Provided information, will help us to solve the reported problem as soon as possible. 

Regards, 
Manivannan Padmanaban 



IS Igor Surla September 1, 2020 02:40 PM UTC

Hi,

In attached example you can replicate two issues with data source refresh when EnableCollapseAll="true".

1. User could not drill down when updates data source of tree grid with subset of previous data source
Step to reproduce:
a. Select from top drop down any value which is first child of Current selection in the grid (in our case "Balance Sheet")
b. When grid refreshes user could not drill down

2. Page is blocked when user changes to data source which includes nodes from previous data source
Steps to reproduce:
a. Drill down two times in tree grid
b. Select from top drop down select any value which is from second level of hierarchy (for example "Total Assets")
c. Now from top drop down select its parent (for Example "Balance Sheet")
d. Now from top drop down select its parent (for Example "Financial Hierarchy")
e. Browser will be blocked and user would need to reload, here is the error discovered with google chrome dev tools:

Error: System.Collections.Generic.KeyNotFoundException: The specified key 'parentUniqueID' does not exist in the ExpandoObject.
   at System.Dynamic.ExpandoObject.System.Collections.Generic.IDictionary<System.String,System.Object>.get_Item(String key)
   at Syncfusion.Blazor.TreeGrid.Internal.ExpandCollapse`1.ExpandCollapseRow(Row`1 Row)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_0(Object state)
   at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronously(TaskCompletionSource`1 completion, SendOrPostCallback d, Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteBackground(WorkItem item)

Please validate if this is Syncfusion bug or advise on possible solution.

Best regards,
Igor Surla

Attachment: TreeGridWithEnableCollapseAll_3483d787.zip


FS Farveen Sulthana Thameeztheen Basha Syncfusion Team September 2, 2020 04:05 PM UTC

Hi Igor, 

Thanks for your details. 

Query#:- You can replicate two issues with data source refresh when EnableCollapseAll="true". 
 
We are able to replicate the both of the issues at our end(refresh the dataSource with EnableCollapseAll as True). Further validating we have confirmed that the reported issues as Bug "Exception throws when we set the DataSource dynamically with PageSizeMode set as All(In this scenario). The fix for the same will be included in our last week NuGet release of September 2020. 

You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.  

Disclaimer:- You can view the feedback once it is moved to validated state. 
 
Until then we appreciate your patience. 

Regards, 
Farveen sulthana T 



Marked as answer
Loader.
Up arrow icon