I found out, that you can filter a list view in a JSLink File very easy by a postback:

function filterList(ctx, filterField, filterValue){
    __doPostBack(controlId, 'NotUTF8;__filter={' + filterField + '=' + filterValue + '}');
    return false;

Is there a way to sort the ListView as well by __doPostback() as well?

Something like this:

__doPostBack(controlId, 'NotUTF8;__order={' + filterField + ', asc}');

I'm sure this is possible but I can't find the right syntax...


Update: Ok, Sebastian Schütze seems to be right: It's not possible :-(

But I still have the baisc problem of sorting: https://sharepoint.stackexchange.com/questions/162559/js-link-and-csr-how-to-use-default-sorting-filtering-and-override-header

  • why are you sure? If I search for the string "NotUTF8;__filter" in all the javascript files which are loaded on a list, i can clearly find the function to do this postback. but there is no other kind of postback implemented. Maybe you should consider using the JSLink features to sort your list instead of sending a direct post back. Sorting is possible for JSLINK and CSR. Nov 4, 2015 at 13:31
  • How do I trigger filtering and reloading an existing list via js link?
    – Dave
    Nov 5, 2015 at 9:07


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.