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

Add class to edit line

1 Answer 1176 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 01 Feb 2018, 10:32 AM

Hi,

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

How can I do it?

thanks

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 02 Feb 2018, 01:33 PM
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.
Tags
Grid
Asked by
Michael
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or