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

Popup Edit Template and Html.EditorFor not working

5 Answers 256 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
Robert Madrian asked on 04 May 2017, 03:00 PM

Hello,

If I use my own Popup Edit Template in Kendo grid with i.e @(Html.EditorFor(m => m.Aktuell)) then I see a normal
Checkbox (see Picture1) - if I use @(Html.Kendo().CheckBoxFor(m => m.Aktuell)) I see the Kendo Checkbox (see picture2)

It seems that using Html.EditorFor in grid Popup Edit Template do not use the Editor templates in Views\Shared\EditorTemplates\?

robert

5 Answers, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 09 May 2017, 02:48 PM
Hi,

I am experiencing difficulties understanding the problem. Are you using a @(Html.Kendo().CheckBoxFor(m => m.Aktuell)) in the popup editor template and it is not getting applied? Are you following the approach from this code library?

In order to provide a precise answer in regards of the issue I would kindly like to ask you to send us the grid  and editor views alongside with information about the folder structure of the application. If you can instead send us a small runnable sample that would be great.

Regards,
Angel Petrov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
answered on 10 May 2017, 08:10 AM

If I use @(Html.Kendo().CheckBoxFor(m => m.Aktuell)) it works as expected!

but if I use @(Html.EditorFor(m => m.Aktuell)) it works not - it looks like that if I use Html.EditorFor the Kendo Checkbox is not used from the Views\Shared\EditorTemplates Folder but a "Standard" Checkbox...

this is only a Problem if I use a partial view as the grid popup edit not in a "normal" view...

 

robert

 

0
Angel Petrov
Telerik team
answered on 11 May 2017, 01:47 PM
Hello Rober,

As far as I understand the beahvior it seems correct. If an @(Html.EditorFor(m=>m.Aktuell)) is used a normal checkbox should appear. Could you please elaborate on what problem arises from the current setup? If you can send us a small sample that illustrates the problem that would be great as we will be able to quickly resolve the matter.

Regards,
Angel Petrov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
answered on 11 May 2017, 01:57 PM

Hi,

if I have the following Code in my Views\Shared\EditorTemplates\Boolean.cshtml template then the Kendo Checkbox should be rendered - right?

@model Boolean?
 
@(Html.Kendo().CheckBoxFor(m => m))
0
Angel Petrov
Telerik team
answered on 12 May 2017, 02:57 PM
Hi Robert, 

Thank you for clarifying. Indeed with the mentioned setup a kendo checkbox should get rendered. I am not sure why is the template failing and in order to further investigate I suggest revising my suggestion for sending us a small sample.

Regards,
Angel Petrov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 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
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
Answers by
Angel Petrov
Telerik team
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
Share this question
or