This question is locked. New answers and comments are not allowed.
I would like to handle my sorting with a client side event.
So something like this:
then:
Is there a way to detect what create the databinding event to be fired? Like command = sortedcolumn
I know there is other ways to do this like creating a custombinding scenario, but I would like to handle it like the above. Is this a bad approach ?
Thanks!
So something like this:
.ClientEvents(e => e.OnDataBinding("sortColumn"))
then:
function sortColumn(e) { try { // What type of command fired this event? Is there something i can do to determine why the event was fired such as... // if (e.type == "sortedcolumn") { // do things } // Single column sort only...$.getJSON("MyController/Action/", { SortedColumns: e.sortedColumns }, function (data) {// rebind data here.... $('#mygrid).data('tgrid').dataBind(data.Data); }, 'json'); } catch (x) { } }
Is there a way to detect what create the databinding event to be fired? Like command = sortedcolumn
I know there is other ways to do this like creating a custombinding scenario, but I would like to handle it like the above. Is this a bad approach ?
Thanks!