BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
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);
<div>@(iquoteDetail.Key)</div>
}
</CaptionTemplate>
</GridGroupSettings>
<GridColumns>
...
</GridColumns>
</SfGrid>
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.
Now...
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!
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.
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
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!
Hi Evendyce,
Thanks for the update. We will wait to hear from you.