change the field in popup editor

4 posts, 1 answers
  1. varun
    varun avatar
    2 posts
    Member since:
    Jul 2012

    Posted 19 Dec 2012 Link to this post

    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
  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 19 Dec 2012 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. varun
    varun avatar
    2 posts
    Member since:
    Jul 2012

    Posted 20 Dec 2012 Link to this post

    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
  5. Answer
    Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 21 Dec 2012 Link to this post

    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!
Back to Top
Kendo UI is VS 2017 Ready