This is a migrated thread and some comments may be shown as answers.

Binding extra events

1 Answer 16 Views
Toolbar
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 08 Jun 2015, 02:46 PM

Hi All, 

Is there a way to bind extra event to the 'create' toolbar button?  I want to populate data before or after into grid column after a new row was insert by kendo. 

I tired the following for the toolbar button but with no luck

‚Äčedit: function (e) {
        e.container.find(".k-grid-add").on("click", function (e) {
        //populate data here
        });                        
  } 

 and this

var grid =  $("#grid").kendoGrid({...});

grid.data().kendoGrid.bind('edit', function (e) {

     e.container.find('.k-grid-add').click(function () {

         //populate data here

});

TIA

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 09 Jun 2015, 05:09 PM

Hello Steve,

If you want to populate data in the grid, you can use the edit event of the grid, and not the toolbar item. If you attach a click handler to the add button when the grid is in edit mode, then this click will take off edit mode the record currently being edited. Can you please elaborate a bit more on the exact scenario that you have?

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Toolbar
Asked by
Steve
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or