Javascript 从devexpress弹出菜单访问属性

Javascript 从devexpress弹出菜单访问属性,javascript,devexpress,Javascript,Devexpress,我想知道如何从弹出菜单接收RowId,从我单击的菜单项接收name 这是我的代码: <script> function OnWorkflowChanged(popup) { alert(menuitem.name + popup.RowId);} </script> <def:PopupMenu ID="popup" ClientInstanceName="popup" runat="server" AutoPostBack="false" PopupE

我想知道如何从弹出菜单接收RowId,从我单击的菜单项接收name

这是我的代码:

<script>
function OnWorkflowChanged(popup)
{
    alert(menuitem.name + popup.RowId);}
 </script>

<def:PopupMenu ID="popup" ClientInstanceName="popup" runat="server" AutoPostBack="false" PopupElementID="imgState" RowId='<%# Eval("ItemNodeId") %>' PopupAction="RightMouseClick">
<ClientSideEvents ItemClick='function(s, e) {  OnWorkflowChanged(s) }' />
<Items>
    <def:menuitem name="type1" text="<%$ Resources: type1%>" Image-Url="~/images/checkbox0.png" />
    <def:menuitem name="type2" text="<%$ Resources: type2%>" Image-Url="~/images/checkbox1.png" />
    <def:menuitem name="type3" text="<%$ Resources: type3%>" Image-Url="~/images/checkbox2.png"/>
    <def:menuitem name="type4" text="<%$ Resources: type4%>" Image-Url="~/images/s_all.png" ItemStyle-BorderTop-BorderStyle="Solid" ItemStyle-BorderTop-BorderWidth="1px" ItemStyle-BorderTop-BorderColor="LightGray" />
    <def:menuitem name="type5" text="<%$ Resources: type5%>" Image-Url="~/images/z_all.png" />

多谢各位

编辑:所以我想出了如何传递menuitem。这真的很简单-e.item.name。但我仍然不知道如何传递RowId。

您需要使用。在服务器上将其设置为所需的值,并在客户端上获取。这里有一个代码片段: