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

Column title is not taken into popup editor field label

1 Answer 199 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Iron
Iron
Veteran
Dan asked on 23 May 2018, 07:47 AM

I have the following grid configuration

@(Html.Kendo().Grid<CompanyLocationViewModel>()
      .Name("companyLocationGrid")
      .Columns(columns =>
      {
         columns.Bound(p => p.Code).Title("Grid Code");
         ...
      })
      .Editable(editable => editable.Mode(GridEditMode.PopUp))
      ...
)

The model does not have any Display attributes attached to it.

The grid look as expected with the header label "Grid Code" however the popup editor still is opened with the label "Code". Is this function as design or a bug? My requirement needs exactly this to have a different label on the grid and the popup. Can I use this to my advantage or this is going to be solved in a future release?

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 28 May 2018, 07:55 AM
Hi Dan,

By default the popup editor is generated using Html.EditorForModel. An editor will be generated for each field in the model using the setting that are defined in the model. If there are no attributes for the field specifying a display name the actual name of the field will be used. 

If you would like to use a different name in the generated popup i would suggest adding a DisplayName attribute to the Code field. 


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
Dan
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Viktor Tachev
Telerik team
Share this question
or