Posted 4 July 2022, 10:02 pm EST
Hello,
Is there a way, to open a context menu on FlexGrid, when rightclicking on a single cell?
Regards,
Nikolas
Forums Home / ComponentOne / Blazor Edition
Posted by: nzd on 4 July 2022, 10:02 pm EST
Posted 4 July 2022, 10:02 pm EST
Hello,
Is there a way, to open a context menu on FlexGrid, when rightclicking on a single cell?
Regards,
Nikolas
Posted 7 July 2022, 6:21 pm EST
HI Nikolas,
We are sorry for the delayed response on this. The development team is working on this with the internal tracking id : C1-3268.
Regards,
Manish Gupta
Posted 24 October 2022, 11:25 pm EST
Hi,
With the latest release for C1 controls, the ContextMenu can be shown. Please refer to the demo sample for reference:
https://www.grapecity.com/componentone/demos/blazor/blazorexplorer/FlexGrid/Index
Regards,
Manish Gupta
Posted 25 October 2022, 5:33 pm EST
Hello Manish,
Is there a way to add custom actions?
Regards, Nikolas
Posted 26 October 2022, 5:21 pm EST
Hi Nikolas,
By handling the CreatingMenu event, the custom menu can be added. Please refer to the attached sample for reference.
Regards,
Manish Gupta
Posted 26 October 2022, 5:21 pm EST
Posted 2 January 2023, 7:54 pm EST
Hello Manish,
When trying to open the context menu, I get the following error:
warn: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[100]
Unhandled exception rendering component: Could not find 'C1Menu.initMenuItemView' ('C1Menu' was undefined).
Error: Could not find 'C1Menu.initMenuItemView' ('C1Menu' was undefined).
at https://localhost:5001/_framework/blazor.server.js:1:497
at Array.forEach (<anonymous>)
at i.findFunction (https://localhost:5001/_framework/blazor.server.js:1:465)
at E (https://localhost:5001/_framework/blazor.server.js:1:2606)
at https://localhost:5001/_framework/blazor.server.js:1:3494
at new Promise (<anonymous>)
at kt.beginInvokeJSFromDotNet (https://localhost:5001/_framework/blazor.server.js:1:3475)
at https://localhost:5001/_framework/blazor.server.js:1:72077
at Array.forEach (<anonymous>)
at kt._invokeClientMethod (https://localhost:5001/_framework/blazor.server.js:1:72063)
Microsoft.JSInterop.JSException: Could not find 'C1Menu.initMenuItemView' ('C1Menu' was undefined).
Error: Could not find 'C1Menu.initMenuItemView' ('C1Menu' was undefined).
at https://localhost:5001/_framework/blazor.server.js:1:497
at Array.forEach (<anonymous>)
at i.findFunction (https://localhost:5001/_framework/blazor.server.js:1:465)
at E (https://localhost:5001/_framework/blazor.server.js:1:2606)
at https://localhost:5001/_framework/blazor.server.js:1:3494
at new Promise (<anonymous>)
at kt.beginInvokeJSFromDotNet (https://localhost:5001/_framework/blazor.server.js:1:3475)
at https://localhost:5001/_framework/blazor.server.js:1:72077
at Array.forEach (<anonymous>)
at kt._invokeClientMethod (https://localhost:5001/_framework/blazor.server.js:1:72063)
at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
at C1.Blazor.Menu.MenuItemView.InitializeAsync()
at C1.Blazor.Core.C1View.OnAfterRenderAsync(Boolean firstRender)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
Unhandled exception in circuit 'vO6Iado2Xj1HjlQlwYWMqJdhBya92mgdUt6pHy0LtzA'.
Microsoft.JSInterop.JSException: Could not find 'C1Menu.initMenuItemView' ('C1Menu' was undefined).
Any idea what it might be?
There is nothing configured, only a default flexgrid with the default context menu.
Regards,
Nikolas
Posted 3 January 2023, 9:54 pm EST
Hi Nikolas,
As per the error message and our investigation, the required Menu script reference is missing. Please add the following reference to the index.html/_Host.cshtml file.
<script src="_content/C1.Blazor.Menu/scripts.js"></script>
Regards,
Manish Gupta