Events on Grid.Editable.Window

2 posts, 0 answers
  1. Tim
    Tim avatar
    4 posts
    Member since:
    Oct 2012

    Posted 06 May 2015 Link to this post

    I am trying to get events to fire on a popup window used for the editor on a grid.  My code is below.  When I review the generated script, the .Window does not get configured with "Open" or "Activate".  Can anyone tell me what I need to do to get these events to fire?


                .Columns(c =>
                    c.Bound(f => f.Foo);
                    c.Bound(f => f.Bar);
                    c.Bound(f => f.Bas);
                    c.Command(a => a.Edit());
                .Editable(e => e
                    .Window(w => w.Events(v => v.Open("OnEditStart").Activate(@<text>function () {console.log("EditWindow.Activate")}</text>)))
                .ToolBar(t =>
                .DataSource(ds => ds
                        .Create(r => r.Action("UpdateIndex", "Home"))
                        .Read(r => r.Action("IndexList", "Home"))
                        .Update(u => u.Action("UpdateIndex", "Home"))
                    .Model( m => {
                        m.Id(f => f.Foo);
  2. Iliana Nikolova
    Iliana Nikolova avatar
    2622 posts

    Posted 08 May 2015 Link to this post

    Hi Tim,

    In order to attach event handler to the Popup window you should use the Grid edit event. As an example: 
    function onEdit(e) {"kendoWindow").bind("activate", function () {
            //Your custom logic
    Keep in mind that the "open" event of the window cannot be used as it is already opened when the "edit" event of the grid is triggered.

    Iliana Nikolova

    See What's Next in App Development. Register for TelerikNEXT.

Back to Top