We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

What event to trap?

Again, I am running against the issue of uncontrolled invocation of class methods on CSLA objects that cannot be called inappropriately, prematurely, and defininately not by reflection.  What event do I need to intercept so that the control does not call the CSLA methods?    The latest example is the SFTreeGrid

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.ArgumentNullException: Value cannot be null. (Parameter 'applicationContext')
   at Csla.Rules.BusinessRules.HasPermission(ApplicationContext applicationContext, AuthorizationActions action, Object obj)
   at Csla.BusinessListBase`2.get_IsSavable()
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   --- End of inner exception stack trace ---
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.PropertyInfo.GetValue(Object obj)
   at Syncfusion.Blazor.TreeGrid.SfTreeGrid`1.ConvertRecordToExpando(Object record, Type dataType, Boolean isComplex)
   at Syncfusion.Blazor.TreeGrid.SfTreeGrid`1.ConvertRecordToExpando(Object record, Type dataType, Boolean isComplex)
   at Syncfusion.Blazor.TreeGrid.SfTreeGrid`1.ConvertToExpando(IEnumerable dataSource)
   at Syncfusion.Blazor.TreeGrid.SfTreeGrid`1.GetFlatData(IEnumerable dataSource, DataReadyArgs`1 dm, Boolean isRemoteChild, Boolean isGanttRecord)
   at Syncfusion.Blazor.TreeGrid.Internal.GridRenderer`1.BindGridDataSource()
   at Syncfusion.Blazor.TreeGrid.Internal.GridRenderer`1.OnInitializedAsync()
   at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()

The thread 'Index' (0x0) has exited with code 0 (0x0).


1 Reply

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team January 10, 2023 03:09 PM UTC

Hi Kevin,


Before proceeding with this, we need some more additional information to find the cause of the issue. Share us the following details.


  1. Complete TreeGrid code example(whether you have faced the issue on Hierarchical binding or Self-reference)
  2. Have you faced the issue on rendering TreeGrid or enabling specific properties or any specific action.
  3. Share us the simple issue replicable sample.
  4. Screenshot/Video demo to replicate the issue.
  5. OnDataBound/Created event will be triggered on TreeGrid render. Please ensure by binding the Events to TreeGrid.


In the meanwhile we will prepare sample and share sample with your shared details.


Regards,

Farveen sulthana T


Loader.
Up arrow icon