javascriptjquerykendo-uidojokendo-sortable

Kendo ui sortable trigger start-event when click on spezific area


i would like customize my kendo Sortable function. I want to start drag my row when i click on the last cell of the row.

I think it would be the easiest, when i trigger the event "start", but i cant trigger the event by myself.

Here is my work at the moment: My Work.

My question is how can i sort a row by just click the last cell?

(Its my first question so if you can give me some tipps to improve my question skills, pls let me know) :)

best wishes lukas


Solution

  • No need to bind a custom click event for that, just define handler property:

    $("#sortable").kendoSortable({
      filter: "tr",
      handler: "td.StartDrag",
      hint: function(element) {
        return $("<span></span>")
          .text(element.text())
          .css("color", "#FF0000");
      },
      start: function(e){
                //the event i wanna trigger with clicking on the last cell
      }
    });
    

    Demo