Edit event for inCell mode - tell us which model field is being edited

4 posts, 0 answers
  1. Curt Rabon
    Curt Rabon avatar
    45 posts
    Member since:
    Dec 2008

    Posted 23 Jun 2015 Link to this post

    I've used Kendo UI since almost the very first release, and the following problem has been there all this time.

    From what I see by looking at your .js source code, when using batch/inCell edit mode you already know which model field is being edited when you call the "edit" event, yet you don't give that info to us in the event arguments.  Why not?  Many, Many times when developers handle the Edit() event in batch/inCell mode, the model field being edited is important to know.

    You could very easily pass that to the event.  I don't understand why you've let it be this way for so long.  Please explain.

  2. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 25 Jun 2015 Link to this post

    Hello Curt,

    This is done for consistency with other (in-line, popup) edit modes as there are no single field associated with the container in those situations.

    However, in order to get the field name for the container for in-cell edit mode you may use the cellIndex method to get associated column and its field name. Similar to the following:

                         edit: function(e) {
                console.log(this.columns[this.cellIndex(e.container)].field);
              }

     

    Regards,
    Rosen
    Telerik
     
    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. Curt Rabon
    Curt Rabon avatar
    45 posts
    Member since:
    Dec 2008

    Posted 25 Jun 2015 in reply to Rosen Link to this post

    That's a shame. See attached picture. You already have the field in your hand when you call the Edit event.  You could simply pass it as the last parameter, and make the documentation say that it's only available in "inCell" mode.

    You already do something similar in the grid's "save" event.  There, the documentation states the following about the e.values property:

    Available only when the editable.mode option is set to "incell".

  5. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 29 Jun 2015 Link to this post

    Hello Curt,

    If you feel such functionality should be included in the library, please feel free to share your suggestion in our feedback portal.

    Regards,
    Rosen
    Telerik
     
    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