Change generated JS class name

2 posts, 0 answers
  1. Andy
    Andy avatar
    8 posts
    Member since:
    Aug 2006

    Posted 09 Jan 2013 Link to this post

    I am using the MVC Helpers and would like to customize the generated Javascript - in particular, the js class name that is used.

    For example, if I do something like this:

                    @(Html.Kendo().Grid<ResourceViewModel>()
                        .Name("Grid")
                        .BindTo(Model.Resources)
                        .YadaYadaYada(...)
                    )

    ... then it generates JavaScript for me like this, which creates a kendoGrid in JS:

            jQuery(function(){jQuery("#Grid").kendoGrid({ ... yada yada yada ...

    I would like to change the kendoGrid class above to my own custom Widget class. So instead of kendoGrid, I have created a kendoCustomGrid which I would like to have generated instead.

    What's the best way to do this?

  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 10 Jan 2013 Link to this post

    Hi Andy,

     This is not something which Kendo  Complete for ASP.NET MVC supports out of the box. If you this is mandatory requirement you should consider modifying the source code of the Kendo.Mvc assembly. That code can be found in Kendo.Mvc\Infrastructure\Implementation\JavaScriptInitializer.cs 

     Have in mind though that Telerik does not provide support for any source code modifications.

    Regards,
    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top