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

change the field in popup editor

3 Answers 210 Views
Templates
This is a migrated thread and some comments may be shown as answers.
varun
Top achievements
Rank 1
varun asked on 19 Dec 2012, 11:35 AM
Hi,
I need to perform some changes in my popup editor after it is loaded, on the selection of a input field some calculation will be done and the result is supposed to be displayed in one of the input filed in the template. Is there a way to intercept some kind of event?  I love this editor and hope to use it, but I need to resolve this issue.  I'd appreciate your comments and suggestions.

Thanks in Advance
Varun

3 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 19 Dec 2012, 06:25 PM
Hello Varun,

You could hook up to the edit event which fires after pop-up editor template is initialized. The editor window could be retrieved through the event arguments - e.container
I hope this will help.

Regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
varun
Top achievements
Rank 1
answered on 20 Dec 2012, 10:25 AM
Hi Alexander,
   Much appreciated with the answer because you have responded too quick. I was confused a bit with answer u have provided for the question and was thinking whether i have expressed my problem properly. Because I need to update a field with the result that i got from the on click of previous field in the popup(model) after it is loaded. For this i got a solution and is working fine as displayed below. But i don't know whether it is the proper to approach for the problem. 

            var uid = $(".k-edit-form-container").closest("[data-role=window]").data("uid");
            var model = $("#grid").data("kendoGrid").dataSource.getByUid(uid);
            model.set("NUM_OF_DAYS", currentholidays1);
I was using this because, once the popup is displayed i can make any changes dynamically. Can u suggest me whether it is correct or not. Sorry if I had made any mistake in expressing. Thanks in Advance
0
Accepted
Alexander Valchev
Telerik team
answered on 21 Dec 2012, 02:29 PM
Hi Varun,

Thank you for the additional information.
Your approach is correct - you are using the set method to edit DataSource's data which is the recommended way.

Kind regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Templates
Asked by
varun
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
varun
Top achievements
Rank 1
Share this question
or