我们可以为devexpress aspxgridview提供2个上下文菜单,一个用于行的上下文菜单和一个用于列标题的上下文菜单? 如果是,那我们该怎么做呢?
答案 0 :(得分:0)
是,你可以这样做..
按照这个 - How to display a popup menu for grid column headers or rows不错的DevExpress示例来说明您正在寻找。
在AspxGridView
multiple context menu
中查看此标记以获取<dxm:ASPxPopupMenu ID="pmColumnMenu" runat="server" ClientInstanceName="pmColumnMenu">
<Items>
<dxm:MenuItem Name="cmdShowCustomization" Text="Column Chooser...">
</dxm:MenuItem>
</Items>
<ClientSideEvents ItemClick="function(s, e) {
if(e.item.name == 'cmdShowCustomization')
grid.ShowCustomizationWindow();
}" />
</dxm:ASPxPopupMenu>
<dxm:ASPxPopupMenu ID="pmRowMenu" runat="server" ClientInstanceName="pmRowMenu">
<Items>
<dxm:MenuItem Text="Export to PDF" Name="cmdExport">
</dxm:MenuItem>
</Items>
<ClientSideEvents ItemClick="function(s, e) {
if(e.item.name == 'cmdExport')
alert('Export simulation.');
}" />
..
{{1}}
如需更多帮助,请查看search result。
希望这有帮助...