2012-05-22 52 views
0

我們是否可以有2個用於devexpress aspxgridview的上下文菜單,一個用於行的上下文菜單和一個用於列標題? 如果是,那我們該怎麼做呢?aspxgridview 2上下文菜單

回答

0

,你可以做到這一點..

按照此 - How to display a popup menu for grid column headers or rows不錯DevExpress的例子,這表明,你正在尋找。

入住此標記在AspxGridViewmultiple 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.'); 
    }" /> 

如需更多幫助,請通過這個search result

希望對您有所幫助...