Hi Bartek,
I understand that you're experiencing an issue with the ContextMenu in the Syncfusion Blazor Scheduler. Specifically, the data is always taken from the left-clicked (greyed) cell, even when you right-click on a different cell.
The behavior you're observing is due to the initial cell being selected, and the data from this selected cell is being passed to the ContextMenu. This behavior is useful when multiple cells are selected and the ContextMenu is opened.
However, if you wish to open the ContextMenu for the cell that you right-click on, even if other cells are selected, you can achieve this by modifying your code slightly.
In the OnItemSelected method, you can modify ActiveCellsData to CellData, where CellData holds the value of the current cell.
public async Task OnItemSelected(MenuEventArgs<MenuItem> args) { var SelectedMenuItem = args.Item.Id; var ActiveCellsData = CellData; } |
We have prepared a sample for you to illustrate this. Please check the sample : https://blazorplayground.syncfusion.com/rtrpZKjsoGEiLKPo
I hope this helps. If you have any further questions or need additional assistance, please feel free to ask.
Regards,
Ram