Hi there , i have this error with a simple kanban from a sql server table
My code
<SfKanban TValue="TodoActivity" KeyField="TodoCode" DataSource="@todoactivitiesDataSource">
<KanbanColumns>
<KanbanColumn HeaderText="To Do" KeyField="@(new List<string>() {"Open"})"></KanbanColumn>
<KanbanColumn HeaderText="In Progress" KeyField="@(new List<string>() {"InProgress"})"></KanbanColumn>
<KanbanColumn HeaderText="Testing" KeyField="@(new List<string>() {"Testing"})"></KanbanColumn>
<KanbanColumn HeaderText="Done" KeyField="@(new List<string>() {"Close"})"></KanbanColumn>
</KanbanColumns>
<KanbanCardSettings HeaderField="Subject" ContentField="Subject"></KanbanCardSettings>
</SfKanban>
TodoActivity todoactivitynew = new TodoActivity { };
protected override async Task OnInitializedAsync()
{
// Lista delle attività
todoactivitiesDataSource = await TodoActivityService.SGetActivities();
}
in the interface
// tutte le attività
Task<List<TodoActivity>> SGetActivities();
in the class that implements interface
public async Task<List<TodoActivity>> SGetActivities()
{
var todoactivities = await _context.TodoActivities
.Include(x => x.TodoCategories)
.Include(x => x.TodoTypes)
.Include(x => x.TodoStatuses)
.Include(x => x.TodoSources)
.Include(x => x.Customers)
.Include(x => x.Projects)
.Include(x => x.Users)
.OrderBy(x => x.StartTime)
.ToListAsync();
return todoactivities;
}
@todoactivitiesDataSource or
todoactivitiesDataSource it is the same
I can't understand where it is wrong
hi i can send you files
An unhandled exception occurred while processing the request.
Syncfusion.Blazor.Kanban.SfKanban<TValue>.DataProcess()
System.NullReferenceException: Object reference not set to an instance of an object. at Syncfusion.Blazor.Kanban.SfKanban`1.DataProcess() at Syncfusion.Blazor.Kanban.Internal.ProcessData`1.OnParametersSetAsync() at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Microsoft.AspNetCore.Components.Rendering.ComponentState.NotifyCascadingValueChanged(ParameterViewLifetime& lifetime) at Microsoft.AspNetCore.Components.CascadingValue`1.NotifySubscribers(ParameterViewLifetime& lifetime) at Microsoft.AspNetCore.Components.CascadingValue`1.SetParametersAsync(ParameterView parameters) at Microsoft.AspNetCore.Components.Rendering.ComponentState.SupplyCombinedParameters(ParameterView directAndCascadingParameters) --- End of stack trace from previous location --- at Microsoft.AspNetCore.Components.Rendering.ComponentState.SetDirectParameters(ParameterView parameters) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForFramesWithSameSequence(DiffContext& diffContext, Int32 oldFrameIndex, Int32 newFrameIndex) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForFramesWithSameSequence(DiffContext& diffContext, Int32 oldFrameIndex, Int32 newFrameIndex) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, Int32 componentId, ArrayRange`1 oldTree, ArrayRange`1 newTree) at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException) at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue() at Microsoft.AspNetCore.Components.RenderTree.Renderer.AddToRenderQueue(Int32 componentId, RenderFragment renderFragment) at Microsoft.AspNetCore.Components.ComponentBase.StateHasChanged() at Microsoft.AspNetCore.Components.ComponentBase.CallOnParametersSetAsync() at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync() at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState) at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.WaitForResultReady(Boolean waitForQuiescence, PrerenderedComponentHtmlContent result) at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.RenderEndpointComponent(HttpContext httpContext, Type rootComponentType, ParameterView parameters, Boolean waitForQuiescence) at Microsoft.AspNetCore.Components.Endpoints.RazorComponentEndpointInvoker.RenderComponentCore(HttpContext context) at Microsoft.AspNetCore.Components.Endpoints.RazorComponentEndpointInvoker.RenderComponentCore(HttpContext context) at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.<>c.<<InvokeAsync>b__10_0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
No query string data.
| Variable | Value |
|---|---|
| .AspNetCore.Antiforgery.HQLn7gSSQmQ | CfDJ8Joie-ICmnhBvtP8dzo8tvNE7ov1Plkbcpz_J39DggIsM_uLnOIep4OOpkKm49H__8DePJrNmZRF4u8vOCb9GlyQPeI0B3s4xR-CzoTZClWxIYnS-m_UJ6oavbHyYmonJk6szedHtcUF2RYcHjqn61Y |
| Variable | Value |
|---|---|
| Accept | text/html; blazor-enhanced-nav=on |
| Accept-Encoding | gzip, deflate, br, zstd |
| Accept-Language | it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7 |
| Cookie | .AspNetCore.Antiforgery.HQLn7gSSQmQ=CfDJ8Joie-ICmnhBvtP8dzo8tvNE7ov1Plkbcpz_J39DggIsM_uLnOIep4OOpkKm49H__8DePJrNmZRF4u8vOCb9GlyQPeI0B3s4xR-CzoTZClWxIYnS-m_UJ6oavbHyYmonJk6szedHtcUF2RYcHjqn61Y |
| Host | localhost:7277 |
| Referer | https://localhost:7277/todomanagement |
| sec-ch-ua | "Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123" |
| sec-ch-ua-mobile | ?0 |
| sec-ch-ua-platform | "Windows" |
| sec-fetch-dest | empty |
| sec-fetch-mode | no-cors |
| sec-fetch-site | same-origin |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 |
| Name | Value |
|---|---|
| Display Name | /todomanagement (/todomanagement) |
| Route Pattern | /todomanagement |
| Route Order | 0 |
| Route HTTP Method | GET, POST |
No route values.