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

Grid Detail Template not fully Rendering with Virtualization Enabled

Hi there,

This is actually a two part issue/question but revolves around the same core issue.

I have a Data grid, and I make use of RowTemplates for the information, which is a separate Razor Component that I pass the header data to. See below for the basic layout:

Code Snippet:

<SfGrid TValue="LAQuoteHeaderModel" DataSource="@client.QuoteHeaders.Where(x => x.IsActive && !x.IsAccepted && !(x.IsRejected ?? false) && !x.IsJobcarded && !(x.IsCompleted ?? false) && !(x.IsReady ?? false))" Height="100%" Toolbar="@(new List<string>() { "Search" })" AllowGrouping="true" AllowSorting="true" AllowFiltering="true" ContextMenuItems="@QuotedGridContextMenu" AllowPaging="true">
                                                                    <GridPageSettings PageSize="50" PageSizes="@(new List<string>() { "50", "100", "All" })" PageCount="5"></GridPageSettings>
                                                                    <GridFilterSettings Type="Syncfusion.Blazor.Grids.FilterType.Excel" Mode="FilterBarMode.Immediate" ShowFilterBarStatus="true"></GridFilterSettings>
                                                                    <GridEvents TValue="LAQuoteHeaderModel" OnRecordDoubleClick="QuoteDoubleClick" ContextMenuItemClicked="QuotedContextMenuClick"></GridEvents>
                                                                    <GridGroupSettings ShowDropArea="false" Columns="@(new string[] { "CombinedGroupNameAndRef" })">
                                                                        <CaptionTemplate Context="grpContext">
                                                                                var iquoteDetail = (grpContext as CaptionTemplateContext);

Now in the Razor Component that loads in the RowTemplate, I have a SfContextMenu control added into it.

See below for an Image representation:

So as in the Image above, each row is made from the Razor Component in the RowTemplate, and right-clicking brings up the context menu as seen in the image.


Issue One

When virtualization is enabled on the Grid, the RowTemplates don't seem to render properly when scrolling down through the grid.

The first, 100 or so rows are no problem, but beyond that the Rows visually look correct, however the Context Menu in the components completely disappears. See below:

As seen, some ways down the grid, no problem with the Context Menu.

And here, further down the results, right-clicking only loads the Browser Context menu now.

I'm not 100% sure, but I believe this issue happens when the next set of Data is loaded and rendered into the grid as the user scrolls down. Any ideas?

Issue Two

As mentioned, issue two is very similar in the sense that the Context Menu for the Row Templates does not render in.

This issue happens when Paging is Enabled (No Virtualization) The first page (Defaulting to 50 Records per page) loads with no problem, Context Menu works as expected.

However, the moment you change the Page, all records Context Menu no longer works. (Both on the page switched to, as well as the page previously on).

I feel the issue that causes this is the same for both situations. When next Data is loaded for Rendering (Either through changing Page or Scrolling in Virtualized grid) subsequent Rows visually load correctly, but Context Menu no longer works.

Any thoughts?

Assistance would be much appreciated!

3 Replies

NP Naveen Palanivel Syncfusion Team May 4, 2023 05:11 PM UTC

Hi Evendyce,

We checked your query, you facing issue that ContextMenu no longer works properly . But report issue does not occurs at our end. Please refer the attached 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 entire Grid code snippet along with model class
  2. Share us the video demonstration of the issue in provided sample.
  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


Naveen Palanivel

Attachment: BlazorApp_ContextMenu_8183665.zip

EV Evendyce replied to Naveen Palanivel May 7, 2023 04:19 PM UTC

Thanks for the response.

Unfortunately, I cannot share all details and snippets surrounding this issue.
I will however create a new Project, and recreate my scenario and share that. (After confirming same issue persists)

Please allow me until Tuesday to get this done.

I appreciate you time and assistance with this issue!

MS Monisha Saravanan Syncfusion Team May 8, 2023 09:44 AM UTC

Hi Evendyce,

Thanks for the update. We will wait to hear from you.

Live Chat Icon For mobile
Up arrow icon