admin管理员组文章数量:1289425
I developed a context menu in Blazor with DevExpress to make a copy of selected record. For doing that I followed the DevExpress instructions:
video
code in github
The example has only the standard menu items of context menu, but I have only a custom item: "Copy Record". I think for this problem it make no difference because index is selected by clicking on grid.
The problem is it return the id of the record which is on top of the selected record is. with selected record I mean the record on which user is click on UI.
Code in list of data is:
<DxGrid @ref="_grid"
Data="@Data"
AllowSort="true"
PageSize="15"
ShowSearchBox="true"
SearchBoxNullText="Suche"
ShowFilterRow="true"
ShowGroupPanel="true"
AutoExpandAllGroupRows="true"
ColumnResizeMode="GridColumnResizeMode.NextColumn"
AllowSelectRowByClick="true"
CustomizeElement="Grid_CustomizeElement"
@oncontextmenu:preventDefault
>
</DxGrid>
<GridContextMenuContainer Grid="_grid" @ref="ContextMenuContainer" />
@code {
private IGrid? _grid;
GridContextMenuContainer ContextMenuContainer { get; set; }
void Grid_CustomizeElement(GridCustomizeElementEventArgs e)
{
if (GridContextMenuHelper.IsContextMenuElement(e.ElementType))
{
e.Attributes["oncontextmenu"] = EventCallback.Factory.Create<MouseEventArgs>(
this,
async mArgs => await ContextMenuContainer.Grid_ContextMenu(e, mArgs)
);
}
}
}
本文标签: devexpressIncorrect visibleindex in context menu of Blazor DX GridStack Overflow
版权声明:本文标题:devexpress - Incorrect visibleindex in context menu of Blazor DX Grid - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741429883a2378293.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论