Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8040613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:57:25+00:00 2026-06-05T03:57:25+00:00

I have many widgets that can use JSON or JavaScript object literals as their

  • 0

I have many widgets that can use JSON or JavaScript object literals as their data sources, and this data seldom changes, like the kendo menu below. This menu is hard-coded, and I’d prefer it stayed that way – I don’t want my app tp get too chatty just populating menus etc – but I’d like to emit that hard code from my Razor view.

$("#view-menu").kendoMenu({
    dataSource: [
            {
                text: 'Save',
                url: '#',
                imageUrl: '@Url.Content("~/Content/Images/Save.png")'
            },
            {
                text: 'Cancel',
                url: '@Url.Action("Edit", "Employee", new {id = Model.EmployeeId})',
                imageUrl: '@Url.Content("~/Content/Images/Cancel.png")'
            }
    ]
});

$(".k-menu a.k-link[href=#]").click(function (e) {
    e.preventDefault();
    $(this).parents('form').first().submit();
});

Is there an existing helper I can use to e.g. render a KendoMenuConfig object that configures this menu? I would like something like this to replace the above:

$("#view-menu").kendoMenu({
    @Html.KendoMenuConfig(blah blah))
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T03:57:27+00:00Added an answer on June 5, 2026 at 3:57 am

    No write your own html helper

    @Html.KendoMenuConfig(blah blah))
    

    return the string that correspond to your config and it will work, you are actually on the right way.

    public static String KendoMenuConfig(this HtmlHelper html,.....)
    

    include the class that contains this extension in you /View/Web.config at the namespace part.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a widget-like block of HTML+JavaScript that people can copy/paste into their HTML-page
I have many classes in GWT that represents graphical widgets . They are packaged
We have written a data store / grid widget system in JavaScript that automatically
I have a use case that I am experimenting with - sandboxing many different
I have a C++ application that can be simplified to something like this: class
I have seen many people telling that you can set setContentView outside the oncreate
OK, I have a page which shows the customer how many Widgets he has.
I have many methods similar to this: void GetColorSky(out float r, out float g,
I have many directories with some sub-directories that need to be deleted. Is there
I have many data frames which are the output of the same kind of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.