Edit event only fires once?

2 posts, 0 answers
  1. Klas
    Klas  avatar
    9 posts
    Member since:
    Aug 2012

    Posted 23 Oct 2012 Link to this post

    I have a problem where I need to have the foreign key dropdowns disabled while editing. I have used the default Event for edit but it only seem to fire once.

    .Events(e => e.Edit("edit"));

    Like this.

        function edit(args) {
            var insertMode = args.model.isNew();
            if (insertMode == false) {

                var dropdownlist = $("#KeyFigureId").data("kendoDropDownList");

                var dropdownlisttwo = $("#DimensionOneId").data("kendoDropDownList");
                var dropdownlist3 = $("#DimensionTwoId").data("kendoDropDownList");

                var dropdownlist4 = $("#DimensionThreeId").data("kendoDropDownList");

    Any chance we could get a separate template for Insert and Edit in the future? (also asked in the webinar).
  2. Petur Subev
    Petur Subev avatar
    1882 posts

    Posted 26 Oct 2012 Link to this post

    Hello Klas,

    Having different templates for insert and edit is not supported by the Grid. What I can suggest you is to use the edit event of the Grid and check whether the e.model.isNew() method returns true or false to distinguish between the edit and insert. Then you can hide the DropDownList with jQuery depending on that variable.

    Kind Regards,
    Petur Subev
    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