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

Remove Column event not firing?

1 Answer 105 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ian
Top achievements
Rank 2
Ian asked on 15 Aug 2013, 10:31 PM
In MVC I have the grid bound to a set of client functions:

                                      .Events(builder => builder
                                          .ColumnHide("columnHideKendo")
                                          .ColumnShow("columnShowKendo")
                                          .ColumnReorder("columnReorderKendo")
                                           )


However, the Hide and Show do not fire when I remove or add a column via the filter menu (see screenshot)

Is there another way to be notified if the user has removed a column?

The Javascript functions look like this:

function columnHideKendo(e) {
    setTimeout(function() {
        e.sender.trigger("dataBoundKendo");
    });
}
 
function columnShowKendo(e) {
    setTimeout(function() {
        e.sender.trigger("dataBoundKendo");
    });
}

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 16 Aug 2013, 09:58 AM
Hi Ian,


The columnHide and columnShow events are fired as expected on my side. You could assure this with some basic implementation.
E.g.
function columnHideKendo(e) {
    console.log("hide");
}
 
function columnShowKendo(e) {
    console.log("show");
}

The reason for the current issue is that you don't have access to the e.sender parameter inside the setTimeout call. If you require some further assistance,  please share some additional information about the current scenario.


Regards,
Dimiter Madjarov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Ian
Top achievements
Rank 2
Answers by
Dimiter Madjarov
Telerik team
Share this question
or