Hi there
I'm trying to use DropDownlist with the Grouping field and the OnReadEvent, with mode = DropDownScrollMode.Scrollable
The OnRead event provides the grouping field to the request. The request is sent to my (API) server that handles the request, and the result is returned . Then after my OnReadHandler method ands, I get an internal exception: "System.NullReferenceException: 'Object reference not set to an instance of an object.'"
with following stack:
Telerik.Blazor.dll!Telerik.Blazor.Components.Common.TelerikSelectBase<SNG.LccNion.API.Model.Dto.IDDescriptiveDto, string>.ProcessGroupData(System.Collections.IEnumerable data) Unknown
Telerik.Blazor.dll!Telerik.Blazor.Components.Common.TelerikSelectBase<SNG.LccNion.API.Model.Dto.IDDescriptiveDto, string>.SetProcessedData(System.Collections.IEnumerable data) Unknown
Telerik.Blazor.dll!Telerik.Blazor.Components.TelerikDropDownList<SNG.LccNion.API.Model.Dto.IDDescriptiveDto, string>.SetProcessedData(System.Collections.IEnumerable data) Unknown
Telerik.Blazor.dll!Telerik.Blazor.Components.Common.DataBoundComponent<SNG.LccNion.API.Model.Dto.IDDescriptiveDto>.ProcessOnReadResult(Telerik.Blazor.Components.ReadEventArgs args) Unknown
Telerik.Blazor.dll!Telerik.Blazor.Components.Common.TelerikSelectBase<SNG.LccNion.API.Model.Dto.IDDescriptiveDto, string>.ProcessOnReadResult(Telerik.Blazor.Components.ReadEventArgs args) Unknown
Telerik.Blazor.dll!Telerik.Blazor.Components.Common.DataBoundComponent<SNG.LccNion.API.Model.Dto.IDDescriptiveDto>.ProcessOnReadData() Unknown
[Resuming Async Method]
> System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.Threading.Tasks.VoidTaskResult>.AsyncStateMachineBox<Telerik.Blazor.Components.Common.DataBoundComponent<SNG.LccNion.API.Model.Dto.IDDescriptiveDto>.<ProcessOnReadData>d__39>.ExecutionContextCallback(object s) Line 292 C#
System.Private.CoreLib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Line 179 C#
System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.Threading.Tasks.VoidTaskResult>.AsyncStateMachineBox<Telerik.Blazor.Components.Common.DataBoundComponent<SNG.LccNion.API.Model.Dto.IDDescriptiveDto>.<ProcessOnReadData>d__39>.MoveNext(System.Threading.Thread threadPoolThread) Line 372 C#
System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.Threading.Tasks.VoidTaskResult>.AsyncStateMachineBox<Telerik.Blazor.Components.Common.DataBoundComponent<System.__Canon>.<ProcessOnReadData>d__39>.MoveNext() Line 350 C#
System.Private.CoreLib.dll!System.Runtime.CompilerServices.TaskAwaiter.OutputWaitEtwEvents.AnonymousMethod__12_0(System.Action innerContinuation, System.Threading.Tasks.Task innerTask) Line 281 C#
System.Private.CoreLib.dll!System.Threading.Tasks.AwaitTaskContinuation.RunCallback(System.Threading.ContextCallback callback, object state, ref System.Threading.Tasks.Task currentTask) Line 697 C#
System.Private.CoreLib.dll!System.Threading.Tasks.Task.RunContinuations(object continuationObject) Line 3486 C#
System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<Telerik.Blazor.Components.ReadEventArgs>.SetResult(Telerik.Blazor.Components.ReadEventArgs result) Line 478 C#
[Completed] Telerik.Blazor.dll!Telerik.Blazor.Components.TelerikDropDownList<SNG.LccNion.API.Model.Dto.IDDescriptiveDto, string>.TriggerReadAsync(Telerik.DataSource.DataSourceRequest request) Unknown
I am struggling to handle the request correctly and provide an answer back to the list that it can handle properly.
Nevertheless I get errors. Is there a working example of using the OnRead event with the GroupField property set to a property of the TItem? Or is this combination impossible inspite of DropDownScrollMode.Scrollable mode?
BTW - In case of large dropdownlist result set I want to fall back to virtual mode, and drop the grouping option, as it is documented that these are not compatible. (This is handled blazor side by checking the dataset count before the first OnRead call)
