Form reloads all data when field loses focus

Hi
When editing a form at runtime and an input field loses focus all of the related form data (ie dropdown data) is reloaded.
You can see this in the o/p window of Radzen or if you watch Sql Profiler you will see the queries running.

I have also run the code from VS only and the same problem exists. I have set a break point on the item load method but that is not being fired after the initial load as you would expect, the question is where is this reload coming from?

For more complex forms it slows down as the items reload.

I get the same problem on a tiny app I created with just 2 joined tables.

Any idea what is happening?

Thanks
Tim

Hi Tim,

We will do our best to provide fix for this tomorrow!

Fixed in Radzen.Blazor 1.2.12 and published to NuGet.

Hi
I have installed and that bug is fixed, thanks for the quick turnaround. However:
It seems a bug that was fixed a few days ago has come back.

When sorting the dropdowngrid and then clicking the search box causes runtime error:

dotnet: warn: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[100]
Unhandled exception rendering component: Target object is not an ExpandoObject
System.InvalidOperationException: Target object is not an ExpandoObject
at System.Linq.Dynamic.Core.DynamicGetMemberBinder.FallbackGetMember(DynamicMetaObject target, DynamicMetaObject errorSuggestion)
at System.Dynamic.DynamicMetaObject.BindGetMember(GetMemberBinder binder)
at System.Dynamic.GetMemberBinder.Bind(DynamicMetaObject target, DynamicMetaObject[] args)
at System.Dynamic.DynamicMetaObjectBinder.Bind(Object[] args, ReadOnlyCollection1 parameters, LabelTarget returnLabel) at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite1 site, Object[] args)
at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
at System.Linq.EnumerableSorter2.ComputeKeys(TElement[] elements, Int32 count) at System.Linq.EnumerableSorter1.ComputeMap(TElement[] elements, Int32 count)
at System.Linq.EnumerableSorter1.Sort(TElement[] elements, Int32 count, Int32 minIdx, Int32 maxIdx) at System.Linq.OrderedEnumerable1.GetEnumerator(Int32 minIdx, Int32 maxIdx)+MoveNext()
at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Radzen.Blazor.RadzenGrid1.get_PagedView()
at Radzen.Blazor.RadzenGrid`1.BuildRenderTree(RenderTreeBuilder __builder)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()

dotnet: fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
Unhandled exception in circuit '8fIJxWHz0VNQ3hJxOvuRH9Xy_LXoIfVs4ndxv4Q_fFI'.
System.InvalidOperationException: Target object is not an ExpandoObject
at System.Linq.Dynamic.Core.DynamicGetMemberBinder.FallbackGetMember(DynamicMetaObject target, DynamicMetaObject errorSuggestion)
at System.Dynamic.DynamicMetaObject.BindGetMember(GetMemberBinder binder)
at System.Dynamic.GetMemberBinder.Bind(DynamicMetaObject target, DynamicMetaObject[] args)
at System.Dynamic.DynamicMetaObjectBinder.Bind(Object[] args, ReadOnlyCollection1 parameters, LabelTarget returnLabel) at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite1 site, Object[] args)
at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
at System.Linq.EnumerableSorter2.ComputeKeys(TElement[] elements, Int32 count) at System.Linq.EnumerableSorter1.ComputeMap(TElement[] elements, Int32 count)
at System.Linq.EnumerableSorter1.Sort(TElement[] elements, Int32 count, Int32 minIdx, Int32 maxIdx) at System.Linq.OrderedEnumerable1.GetEnumerator(Int32 minIdx, Int32 maxIdx)+MoveNext()
at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Radzen.Blazor.RadzenGrid1.get_PagedView()
at Radzen.Blazor.RadzenGrid`1.BuildRenderTree(RenderTreeBuilder __builder)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()

This is something new related to sorting. I'll check what's going on immediately.

Fixed and published to NuGet.

Great stuff guys - thanks :slight_smile: