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

OpenContextMenu on grid throws error since version > 20.4.0.44

A fairly simple grid with a context menu which was working fine and still works ok if I roll back to 20.4.0.44 now throws an unexpected error. Here is the grid:

<SfGrid ID="ContainerGrid3" @ref="gridRefs[2]" EnableAdaptiveUI="true" AdaptiveUIMode="AdaptiveMode.Mobile" RowRenderingMode="@(_isSmall ? RowDirection.Vertical : RowDirection.Horizontal)" AllowExcelExport="true" AllowPdfExport="true" DataSource="@_containerList" AllowSorting="true" AllowResizing="true" AllowFiltering="true" AllowPaging="true" ContextMenuItems="@(new List<ContextMenuItemModel>() {new ContextMenuItemModel {Text = "Share/Unshare", Target = ".e-content", Id = "sharecontainer"}})">
                    <GridSelectionSettings AllowDragSelection="true" Type="SelectionType.Single"></GridSelectionSettings>
                    <GridEvents ContextMenuItemClicked="OnContextMenuClick" TValue="Container" ContextMenuOpen="OnContextMenuOpen" OnActionBegin="ActionBegin"></GridEvents>
                    <GridFilterSettings Type="@(_isSmall ? FilterType.Excel : FilterType.FilterBar)"></GridFilterSettings>
                    <GridColumns>
                        <GridColumn Field=@nameof(Container.SiteName) HeaderText="Site Name" Type="ColumnType.String" TextAlign="TextAlign.Left" Width="50" AllowEditing="false"></GridColumn>
                        <GridColumn Field=@nameof(Container.OwnerName) HeaderText="Customer" TextAlign="TextAlign.Left" Width="50" AllowEditing="false" Visible="_ownerVisible"></GridColumn>
                        <GridColumn Field=@nameof(Container.ContainerType) HeaderText="Type" Type="ColumnType.String" TextAlign="TextAlign.Left" Width="50" AllowEditing="false"></GridColumn>
                        <GridColumn Field=@nameof(Container.ContentTypeName) HeaderText="Contents" TextAlign="TextAlign.Left" Width="40" AllowEditing="false"></GridColumn>
                        <GridColumn Field=@nameof(Container.FillLevel) HeaderText="Fill Level" Type="ColumnType.Number" TextAlign="TextAlign.Left" Width="40" AllowEditing="false"></GridColumn>
                        <GridColumn Field=@nameof(Container.DateWhenFull) HeaderText="Date When Full" Type="ColumnType.Date" Format="yyyy-MM-dd" TextAlign="TextAlign.Left" Width="40" AllowEditing="false"></GridColumn>
                        <GridColumn Field=@nameof(Container.LastServiceEvent) HeaderText="Last Service" Type="ColumnType.Date" Format="yyyy-MM-dd" TextAlign="TextAlign.Left" Width="40" AllowEditing="false"></GridColumn>
                        <GridColumn Field=@nameof(Container.Latitude) HeaderText="Latitude" Type="ColumnType.Number" TextAlign="TextAlign.Left" Visible="@(!_ownerVisible)" Width="40" AllowEditing="false"></GridColumn>
                        <GridColumn Field=@nameof(Container.Longitude) HeaderText="Longitude" Type="ColumnType.Number" TextAlign="TextAlign.Left" Visible="@(!_ownerVisible)" Width="40" AllowEditing="false"></GridColumn>
                        <GridColumn Field=@nameof(Container.SharedFlatRate) HeaderText="Shared Rate" Type="ColumnType.Number" Visible="_ownerVisible" TextAlign="TextAlign.Left" Width="40" AllowEditing="false"></GridColumn>
                        <GridColumn Field=@nameof(Container.SharedPercentage) HeaderText="Shared Percentage" Type="ColumnType.Number" Visible="_ownerVisible" TextAlign="TextAlign.Left" Width="40" AllowEditing="false"></GridColumn>
                        <GridColumn Field=@nameof(Container.AreaName) HeaderText="Area" TextAlign="TextAlign.Left" Width="40" AllowEditing="false"></GridColumn>
                    </GridColumns>
                </SfGrid>

The error shows in the browser console:

error.png


1 Reply

NP Naveen Palanivel Syncfusion Team March 15, 2023 04:08 AM UTC

Hi Sheldon,


I understand that you faced an issue after opening the context menu in the grid. However, I would like to inform you that we have prepared a sample in the latest version (20.4.0.53) and we have not experienced the reported issue at our end. I have attached the sample for your reference.


If the reported issue still reproduced then kindly share the below details to validate further at our end.

  1. Share us the video demonstration of the issue in provided sample.
  2. Please once ensure your project in latest version.
  3. If possible share us an simple issue reproduceable sample or try to modify the above mentioned sample.


The above-requested details will be very helpful for us to validate the reported query at our end and provide the solution as early as possible


Regards,

Naveen Palanivel


Attachment: Blazor_ContextMenu_666ba686.zip

Loader.
Live Chat Icon For mobile
Up arrow icon