1

Does anybody know how to change only the text of a kendoui menu item using either Javascript or JQuery?

enter image description here

For example a user clicked on the "Medium Size Files" sub menu. I like to replace "Filter Comments" (Parent menu of "Medium Size Files" sub item) using either Javascript or JQuery.

here is the code for the kendo menu control:

@(Html.Kendo().Menu()
    .Name("mnuComments")
    .Items(main =>
    {
        main.Add()
            .Text("Export As")
            .Items(sub =>
            {
                sub.Add().Text("Word");
                sub.Add().Text("Excel");
                sub.Add().Text("PDF");
            });

        main.Add()
            .Text("Filter Comments")
            .Items(sub =>
            {
                foreach (ActiveProjectFilter filter in Model.CommentsFilter)
                {
                    sub.Add()
                        .Text(filter.ProjectName)
                        .HtmlAttributes(new { onclick = "LoadComments(" + filter.ProjectID + ")" });
                }
            });
        })
)
4

0 回答 0