This is a migrated thread and some comments may be shown as answers.

Change generated JS class name

1 Answer 60 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Andy
Top achievements
Rank 1
Andy asked on 09 Jan 2013, 09:03 PM

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?

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 10 Jan 2013, 01:18 PM
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!
Tags
General Discussions
Asked by
Andy
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or