0
votes

I am using telerik grid for mvc in operation mode and i want find the sort and filter event that is when i click the column header for sorting the sort event is called and i want to reset a certain variable when sort is called how can i do that...

The click event is not being recognized when i click on the header part dont know why but some how its being cancelled

i have tried binding it explicitly and tried namespacing the event but it didnt work

 $(".thead").bind("click.namespace");

or

 $(".t-link").bind("click.namespace");

or

$("#gridID>table>thead").bind("click.namespace");

couldn't capture it with

 $(".thead").live("click.namespace", function (e) {
          console.log("t-head");
      });

or if i do

  $(document).click(function (e) {
      console.log(e.target);
      console.log($(e.target).attr("class"));
  });

works well with clicks on the table cell but when click on the column header nothing gets logged

enter image description here

1

1 Answers

1
votes
.ClientEvents(events => events.OnDataBinding("yourFunction"))

function yourFunction() {
    alert("the grid is being databound - sort, filter, grouping or refresh has been used.");
}