Add class to edit line

2 posts, 0 answers
  1. Michael
    Michael avatar
    50 posts
    Member since:
    May 2014

    Posted 01 Feb 2018 Link to this post

    Hi,

    I want to add a specific class to the inputs in Inline editing .

    How can I do it?

    thanks

  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    2487 posts

    Posted 02 Feb 2018 Link to this post

    Hello Michael,

    By default the editors for the Grid component are located in the ~/Views/Shared/EditorTemplates folder. There are partial views there and the name of each Partial View corresponds to the data type it is related to. 

    Thus, if you would like to specify a class name for the editor that is related to fields where the DataType attribute is set to Currency you should modify the Currency.cshtml View like illustrated below. 


    @model decimal?
     
    @(Html.Kendo().CurrencyTextBoxFor(m => m)     
          .HtmlAttributes(new {@class="customClass"})
          .Min(0)
    )


    If you would like more information on customizing the editors used in the Grid component you would find the following article interesting.



    Regards,
    Viktor Tachev
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top