k-on-save event passing undefined value in inline editing

2 posts, 1 answers
  1. Fabio
    Fabio avatar
    24 posts
    Member since:
    Nov 2013

    Posted 24 Mar 2016 Link to this post

    Hi,

    i have a problem with passing value with k-on-save event.

    this is the html code:

     <div kendo-grid
             id="LineGrid"
             k-data-source="lineCtrl.linesList"
             k-editable="'inline'"
             k-selectable="'single'" 
             k-on-save="lineCtrl.OnSaveEventHandler(e)"                 
             k-toolbar="['create']"
             k-sortable="true"
             k-scrollable="false"
             k-filterable="true"
             k-pageable="{ 'refresh': false, 'pageSizes': true }"
             k-columns="lineCtrl.LineDataSourceColumns"
             kx-selected-item="lineCtrl.CurrentLine"
             kx-instance="lineCtrl.LineGrid"
             class="bm_grid">
        </div>

    this is the function OnSaveEventHandler:

    public OnSaveEventHandler(e)
            {
                alert("OnSaveEvent: " + e);
            }

    when i click on the update button, the alert show "OnSaveEvent: undefined".

    i want to pass the value to the function

    how can i solve it?

     

  2. Answer
    Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2310 posts

    Posted 28 Mar 2016 Link to this post

    Hello Fabrizio,

    You should pass the argument to the event handler using the kendoEvent variable.

    http://docs.telerik.com/kendo-ui/AngularJS/introduction#event-handlers

    Regards,
    Dimiter Madjarov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top