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

Grid and edit css styles

1 Answer 232 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Volker
Top achievements
Rank 1
Volker asked on 10 Mar 2013, 01:23 PM
Hi,

I have to say, I wasted now really a lot of time in figuring out how the css styles are applied to the grid edit controls:

I did two tests:
1) Use the Kendo Grid with Javascript configuration
2) Use the grid with MVC Wrapper configuration

And I get different styles for the editors (e.g string editors) when doing that! After research, probably that's what explained here: 
http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/helpers/grid/editor-templates

In Version 1), the text boxes get the class "k.input k-textbox". Fine, that's what I want
In Version 2), the tet boxes get the class "text-box single-line". Why the difference?

Do I really have to declare editor templates now for every data type I want to edit? In that case, I could probably go on with the free Kendo edition and do not use the server wrappers. Why does it cause additional effort when I use them? Can someone explain?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 12 Mar 2013, 01:29 PM
Hi Volker,

The Kendo UI MVC Grid editor fields are created by the MVC framework (EditorFor()...), not by the Kendo code. That is why the CSS classes are different. As you suggested, you can use an editor template with the desired CSS class:

Html.TextBoxFor(model => model, new {@class="k-textbox" })

The server wrappers are not the only benefit of the commercial Kendo UI license. You can also take advantage of Telerik's developer support service and develop non-open-source projects. The non-commercial Kendo UI distribution is provided with a GPL 3 license.

Greetings,
Dimo
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
Volker
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or