Grid EDIT Popup Double Click Event Bug

3 posts, 1 answers
  1. NHJ
    NHJ avatar
    59 posts
    Member since:
    Nov 2019

    Posted 12 Dec 2019 Link to this post

    This may not be a bug, but I think it's a bug.

    I found something strange while using the edit popup.



    {command: [{name: "edit", text: "edit"}], title: "feature", width: 100, filterable: false}

    If you modify it using, no problem occurs.

     
    dataBound: function (e) {
                    var grid = this;

                    grid.element.on ('dblclick', 'tbody tr', function (e) {
                        grid.editRow ($ (e.target) .closest ('tr'));
                    })
                },

    However, if you try to use the edit screen by using double-click instead of edit command, you now have a definite problem.

    After opening the registration window once and canceling, double-clicking an existing item creates several windows.

    What bug is this?

     

    We will replace it with a YouTube link due to video size limitation.

    https://youtu.be/FEl7LLfWD1w

     

  2. Answer
    Tsvetomir
    Admin
    Tsvetomir avatar
    611 posts

    Posted 13 Dec 2019 Link to this post

    Hi Nam,

    The DataBound event handler is thrown every time a modification to the data has been done. Therefore, it would be triggered quite often and this might lead to the attachment of the same click handler multiple times - resulting in a faulty behavior. What I can recommend is that you attach the handler only once after the initialization of the grid. 

              $("#grid").getKendoGrid().one("dataBound", function(e){
                var grid = this;
    
                grid.element.on ('dblclick', 'tbody tr', function (e) {
                  grid.editRow ($ (e.target) .closest ('tr'));
                })
              })

    Check out the corresponding Dojo sample here:

    https://dojo.telerik.com/OtICecuk

    I hope you find this helpful.

     

    Best regards,
    Tsvetomir
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. NHJ
    NHJ avatar
    59 posts
    Member since:
    Nov 2019

    Posted 13 Dec 2019 in reply to Tsvetomir Link to this post

    You'll see it in the next task, but that's probably going to be solved. Thank you very much!
Back to Top