I have embedded a dxMenu in a column in DataGrid like this
HTML@(
Html.DevExtreme().DataGrid<MyObject>()
.Columns(col=>{
col.Add()
.Option("cellTemplate", new JS("actionCellTemplate"))
.DataType(GridColumnDataType.Object)
.Width(40)
.Caption("")
.AllowExporting(false)
.AllowFiltering(false)
.AllowHiding(false)
.Fixed(true)
.FixedPosition(HorizontalEdge.Right)
.ShowInColumnChooser(false)
.Alignment(HorizontalAlignment.Center);
})
)
with script
JavaScriptvar actionMenuData = [{ text: "", icon: "menu", items: [{ text: "Details", value: "details" }, { text: "Permissions", value: "permissions" }, { text: "Plans", value: "plans" }, { text: "Application Secret", value: "secret" }] }];
function actionCellTemplate(cellElement, cellInfo) {
$('<div>').dxMenu({
items: actionMenuData,
showFirstSubmenuMode: { name: 'onHover', delay: { show: 0, hide: 0 } },
hideSubmenuOnMouseLeave: true,
onItemClick: function (e) {
if (e.itemData.value) {
switch (e.itemData.value){
case "details":
window.location = '@Url.Action("Details","Application")/' + cellInfo.data.ID;
break;
case "permissions":
window.location = '@Url.Action("Permissions", "Application")/' + cellInfo.data.ID;
break;
case "plans":
window.location = '@Url.Action("ChargePlans", "Application")/' + cellInfo.data.ID;
break;
case "secret":
window.location = '@Url.Action("Secret", "Application")/' + cellInfo.data.ID;
break;
}
}
}
}).appendTo(cellElement);
}
The menu appeared as 3 strips before upgrading to 17.2.7. After the upgrade, the menu has a down arrow overlapped on the menu icon. How can I remove the down arrow?
Hi Edwin,
Thank you for bringing this to our attention. I've reproduced the issue. We need additional time to research it. We will update the ticket when we have any news.
In the meantime, override the "dx-menu .dx-menu-horizontal .dx-menu-item-popout:before" CSS rule in the following manner:
.dx-datagrid .dx-menu .dx-menu-horizontal .dx-menu-item-popout:before { content: ""; }
The https://codepen.io/anon/pen/qogKpP?editors=0110 example shows this approach in action.