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

EditorTemplate to KendoTemplate

8 Answers 1395 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gusev
Top achievements
Rank 1
Gusev asked on 13 Nov 2017, 01:47 PM
Hello guys

The main problem is that I need a grid with "popup/batch" editing, but as I know kendo doesn't have such a functionality right now.

So, here we are: "how to convert an asp editor template to a kendo template and then use it inside a popup grid window with all binds"?
If I understand the process correctly:
1) I create an empty model (for example: var customer = new Customer();)
2) I call this one: var wholeHtmlCode = @Html.EditorFor(x => customer)
3) *Magic transformation where I put 'wholeHtmlCode' into kendo template*.
4) When I click "add/edit" button on grid, I open my custom window with template and make "binds".

Thanks in advance

8 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 15 Nov 2017, 08:47 AM
Hello, Gusev,

I can suggest checking our demo of how to use a custom Popup editor and to bound all of the used fields to the model:

https://docs.telerik.com/aspnet-mvc/helpers/grid/how-to/editing/custom-popup-editor

If additional assistance is needed, please provide a runnable example, so we can provide a suggestion best suited for it.

Regards,
Stefan
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.
0
Gusev
Top achievements
Rank 1
answered on 15 Nov 2017, 09:27 AM

Good afternoon,

Thanks for response

There is a small problem that an example, that you have sent me, doesn't contain a grid with "batch" editing. I don't have problems with a custom editor template for a grid with "popup" editing. P.s. Grid crashes when I use "batch" with a popup editing and I know that there is no such a possibility to do that from a "box", that's why I've asked about convertation "EditorTemplate" to "KendoTemplate". Probably I've missed the idea that you've tried to explain me, sorry for that, but I still need help

0
Gusev
Top achievements
Rank 1
answered on 15 Nov 2017, 09:52 AM

I've attached the link
https://www.dropbox.com/s/c188v2qukgt3yzn/KendoPopupBatch.rar?dl=0

We have a grid with a popup editing and an enabled batch option
1) We try to add/edit current item
2) Then we click "save/update" button
3) Nothing happens (cuz it's not a functionality from a 'box')

I've checked this example, popup_batch , but that's not what I want, cuz an author recommends to create a new editor window for grid

<div id="externalEditor" data-role="window" id="win" style="display:none" data-visible="true">  <br>    <input data-bind="value:Name" /><br>    <input data-bind="value:BirthDate" data-role="datetimepicker" /><br>    <input data-role="dropdownlist" data-bind="source:values,value:EyeColorIndex" data-value-field="value" data-text-field="text" data-option-label="Please choose..."/><br></div>

I want to convert my existed asp editor template to kendo template. What's the point to write again this "data-bind=dropdownlist mivalue =..." and etc. It's very difficult, especially to support it later.
0
Stefan
Telerik team
answered on 16 Nov 2017, 03:01 PM
Hello, Gusev,

Thank you for providing the details and clarifying the scenario.

I do understand that this will require an additional custom code, but for now, this is the only supported way to use a batch editing with in combination with popup(window) editing.

A similar scenario is discussed in this forum thread as well:

https://www.telerik.com/forums/batch-editing-with-popup-editor

Still, I can suggest submitting a feature request to support the inline and the popup editings in Batch mode. Then based on its popularity we may implement it in a future release:

http://kendoui-feedback.telerik.com/forums/127393-kendo-ui-feedback?category_id=170280

Regards,
Stefan
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.
0
Gusev
Top achievements
Rank 1
answered on 17 Nov 2017, 07:25 AM

Hello, Stefan

Thank you for response

I also understand that it will require an additional code and I don't mind to do that, just there are two ways to do that

1) Creating a div in html with all inputs (both links (that you sent and that I sent before) are related to this method)

2) Converting an asp mvc editor template to kendo template (nowhere this method is described)

And I'm trying to find out how to use the second approach. You guys do the same in Kendo MVC, I am sure (guys from a team, who is responsible for developing 'kendo mvc', have to know).

0
Stefan
Telerik team
answered on 20 Nov 2017, 11:42 AM
Hello, Gusev,

Regarding the second approach. This is not officially supported, and it is not recommended by our team.

Could you please advise where this approach was found as a possible one, so we can remove it or disprove it to not cause any confusion in the future?

Please have in mind that our approach is not to evaluate the server template to a Kendo UI template, instead, internally we use an editor function.

Currently, the available approaches are to use custom Window as an editor or/and to submit a feature request for a built-in support.

Regards,
Stefan
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.
0
Gusev
Top achievements
Rank 1
answered on 21 Nov 2017, 08:08 AM

Hello, Stefan,

Thank you for your response, it doesn't solve my problem tho, so I will try to find it out myself inside the kendo code, probably later I will write the answer over here if I find the solution of course

And do not worry, as I said before this approach was described "nowhere" :)

0
Stefan
Telerik team
answered on 21 Nov 2017, 11:30 AM
Hello, Gusev,

If you need further assistance with the built-in features or more details for a specific part of the code when researching, please let us know and we will gladly assist.

Please have in mind that as mentioned our internal approach is not to evaluate the templates and by doing this unexpected issues may occur.

Regards,
Stefan
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
Gusev
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Gusev
Top achievements
Rank 1
Share this question
or