Grid and edit css styles

2 posts, 0 answers
  1. Volker
    Volker avatar
    5 posts
    Member since:
    Mar 2013

    Posted 10 Mar 2013 Link to this post


    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:

    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?

  2. Dimo
    Dimo avatar
    8406 posts

    Posted 12 Mar 2013 Link to this post

    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.

    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top